This is an Android news application built using the MVVM architecture pattern and Jetpack libraries such as Navigation Component, Room API, Pagination3, Retrofit, Glide, and OkHttp. The app fetches news articles from the NewsAPI and displays them in a clean and organized manner.
Please find below some screenshots of the app:
- Browse news articles from various categories, such as business, entertainment, general, health, science, sports, and technology.
- Read full articles within the app, with the option to open the article in the devices default browser.
- Save articles to read later, even without internet connectivity.
- Search for news articles by keyword.
- AndroidX - Android support library.
- ViewModel - Architecture component for managing UI-related data.
- Flow - Architecture component for building lifecycle-aware applications.
- Room - Persistence library for SQLite databases.
- Navigation Component - AndroidX library for managing navigation between destinations.
- Retrofit - HTTP client for Android and Java.
- OkHttp - HTTP client that supports HTTP/2 and allows for interceptors and network event logging.
- Glide - Image loading library for Android.
- Pagination3 - AndroidX library for paginating data in a RecyclerView.
The app follows the MVVM architecture pattern, where the ViewModel acts as the mediator between the View and the Model. The View contains the UI logic, while the Model contains the business logic and data access code. The ViewModel fetches data from the Model and exposes it to the View, and also updates the Model with user input from the View.
To build the app, follow these steps:
- Clone the repository to your local machine.
- Open the project in Android Studio.
- Build the project using the Gradle build system.
- Run the app on an Android device or emulator.