During Google I/O 2017, Android Team announced guidelines for architecture of Android app. This is just sample app explaining the new Architecture Guidelines written in Kotlin, YAY!
It's an extremely simple app which uses NewsAPI to show the latest news from Google News. It uses Retrofit 2 to fetch the news from the API and save them into database using Room. The main aim of this sample app is show how to use the new Architecture Guidelines with Kotlin.
- Go to NewsAPI and generate an API key (It's only 2 steps!)
- Put the API key at the bottom of the
gradle.properties
NEWS_API_KEY = "YOUR_API_KEY"
- Run the app
- Enjoyyyyy ๐
The app uses ViewModel
to abstract the data from UI and Repository
as single source of truth for data. Repository
fetch the data from database if it doesn't exist then it fetches from the webservice.
- Write article explaining the complete flow of application
- Create fork of repo showing integration with Dagger 2
- Write test cases
- Android Studio 3.0 Canary 4
- Android Device with USB Debugging Enabled
- Android Studio - The Official IDE for Android
- Kotlin - The Official Language for Android
- Gradle - Build tool for Android Studio
Please read CONTRIBUTING.md for contributions.
Proudly ๐ช made in Kotlin
The MIT License (MIT)
Copyright (c) 2017 Akshay Chordiya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.