A simple application for viewing news with multimodule architecture, MVVM, paging, unit tests.
GlobalNews requires a minimum API level of 23. Clone the repository. To request news, you will need an API key, i.e.
global_news_api_key from GNews. If you don’t have an account yet, you will need to create one to request an API key.
In the root directory of your project, inside the local.properties file (create it if it is not available), include the following lines:
# Get this from GNews global_news_api_key=<insert> global_news_base_url="https://gnews.io/api/v4/"
- Kotlin a statically typed, object-oriented programming language running on top of Java Virtual Machine and developed by JetBrains.
- MVVM (Jetpack ViewModel + LiveData) an architectural pattern that improves the separation of tasks, it allows you to separate the logic of the user interface from the business logic of the app.
- Multi module allows you to split the application into features. A feature is a logically complete, maximally independent program module that solves a specific user problem, with clearly defined external dependencies, and which is relatively easy to reuse in another program.
- Single Activity an architecture that has only one activity acting as a container for fragments
- Paging Library helps you load and display small chunks of data at a time.
- Dagger 2 for dependency injection.
- Retrofit a REST Client for Android which makes it relatively easy to retrieve and upload JSON (or other structured data) via a REST based webservice.
- Room persistence library which provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
- Cicerone is a lightweight library that makes the navigation in an Android app easy.
- Material Design 3 an adaptable system of guidelines, components, and tools that support the best practices of user interface design.
- View Binding is a feature that allows you to more easily write code that interacts with views..
- Coroutines lightweight threads. This allows us to write asynchronous non-blocking code in a consistent manner
- Flow an addition to Kotlin coroutines for asynchronous processing of data streams that are executed sequentially.
- ViewModel to store and manage UI-related data in a lifecycle conscious way.
- Unit tests to test individual parts of the application.
- Android KTX which helps to write more concise, idiomatic Kotlin code.