/D2-news-application

This is an application that consumes Newyork times API. This application is built using Kotlin and MVVM architecture

Primary LanguageKotlin

CircleCI

News Application

This is an application that consumes Newyork times API. This application is built using Kotlin and MVVM architecture

To Get Started

  • Clone this repository
  • Get an api key from Key
  • Include the api key in the build.gradle file and replace the ******* with the key

App Features

  1. Users can view the top stories from categories like headline, fashion and food from the Newyork times
  2. Users can share the personalized message with their contacts name on their phone.
  3. Offline reading.

Download the Application

The application can be accessed using this link

Application Architechure

This application was written following the MVVM (Model-view-viewModel) architechure. The main reason behind this choice is because it enables us take advantage of the Google architechure components/ Android Jetpack components like the viewModel, Room, livedata, Navigation Component and Databinding which was all evident in this application. I also made use of other libraries to ensure a seemless flow. They are listed below.

The application follows best practices such as the repository pattern for abstracting classes and Dagger 2 For Dependency Injection.

Libraries/Tools Used

  • Use Retrofit for networking
  • Use RxJava observing data changes and making asynchronous calls.
  • Use Picasso for image loading
  • Use Room for storing data
  • Use Content Provider to allow the user view the contacts on a phone to allow them share a message
  • Use Databinding
  • Use Dagger 2
  • Language used - Kotlin (being the official language of Google)

Test

  1. For unit test ./gradlew test
  2. For ui test ./gradlew connectedAndroidTest