NewsFeed is a Native Android Application that fetches news data from CBC News Api and displays the news feed.
- App fetches news content from CBC Api and shows in the app with Android View.
- Filterers the news feed by the dynamic "type" field from the Api.
- When App loses network connection it notifies the UI.
- 2-3 Unit and/or UI Tests.
- A Readme file to onboard a developer.
- Data persistence.
- Pagination.
- Fix the label bug when saving each News Item.
- Fix ui when we save each item (when saving data it goes straight to offline mode ~ This can be fixed by creating two fragments and observe each data source in each fragments).
- More Unit tests with Mockk or Mockito
- Based on the scope of project and requirement decided to go with Model- View - Model Architecture.
- Decided not implement dependency injection for the simplicity and maintainability and reduction of overhead in terms of setup and initialization
- Chose recycler view over list view based on it's performance, flexibility, Customizability, Separation of concerns and Integration with DiffUtil
- Used horizontal- recycler view for filtering because of the dynamic nature of "type" data coming from api
- Used Floating action button to load all news again after filtering.
- Kotlin - *Kotlin for Android is a modern, expressive programming language designed for Android app development. It offers concise syntax, null safety, and seamless interoperability with Java, making it a popular choice among Android developers.
- Retrofit - REST Client Library
- Retrofit is a widely used library for Android app development, providing a simple and efficient way to make network requests. It offers a concise and intuitive API, enabling developers to handle RESTful APIs easily and seamlessly integrate them into their Android apps.
- Glide - Image Loading Framework
- Glide is a popular image loading and caching library for Android, designed to efficiently load and display images in apps. It offers a simple API and supports various image formats, resizing, and transformations, making it easy for developers to handle image loading and caching tasks in Android applications
- Room - ORM
- ROOM is an Android architecture component that simplifies local database management by providing an easy-to-use abstraction layer over SQLite. It offers efficient data access and supports data migrations, making it a popular choice for Android app developers.
# Checks build and lint
$ ./gradlew build check
# Execute local unit tests
$ ./gradlew test
# Start Android emulator
$ ./emulator -avd <name_of_emulator>
$ ./gradlew connectedAndroidTest
Test results: path_to_app/app/build/reports/androidTests/connected/ directory