Modular news app written in jetpack-compose. The main aim of this app to make an api call using retrofit and storing it to room database and integrate all with compose-ui using livedata, viewmodel and observer.
There is two module in this app
- app :- It will contain all the ui and viewmodel code.
- data :- It will handle database and api call.
I also added dark and light mode for this app which is really simple to deal in compose-ui.
You will require latest version of android studio. Currently, I am using android studio android studio 4.0 Canary 1.
API KEY setup
- Login/Register to newsapi.org and then generate your api key.
- Create a properties file in project root folder and name it credential.properties.
- Add your api key as show below in your credential.properties file
NEWS_API_KEY="Your_Api_Key_Goes_Here"
- Build the app and you are good to go.