https://github.com/nishalnt/newsapp-android
NewsApp is an Android application that provides users with the latest news articles from various sources. The app fetches news data from a remote API and displays it in a user-friendly interface.
https://github.com/nishalnt/newsapp-android
android-development mvvm-android newsapi
Last synced: 2 months ago
JSON representation
NewsApp is an Android application that provides users with the latest news articles from various sources. The app fetches news data from a remote API and displays it in a user-friendly interface.
- Host: GitHub
- URL: https://github.com/nishalnt/newsapp-android
- Owner: NishalNT
- License: mit
- Created: 2024-06-24T17:49:33.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-25T08:08:24.000Z (12 months ago)
- Last Synced: 2025-02-11T14:23:15.241Z (4 months ago)
- Topics: android-development, mvvm-android, newsapi
- Language: Kotlin
- Homepage:
- Size: 635 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NewsApp 📰📱
NewsApp is an Android application that provides users with the latest news articles from various sources. The app fetches news data from a remote API and displays it in a user-friendly interface.
## Table of Contents
- [Features](#features)
- [Screenshots](#screenshots)
- [Installation](#installation)
- [Usage](#usage)
- [Architecture](#architecture)
- [Libraries Used](#libraries-used)
- [License](#license)## Features
- Fetches the latest news articles from a remote API
- Displays news articles in a list
- Users can view detailed news articles
- Search functionality to find specific news articles
- Responsive and user-friendly UI## Screenshots
![]()
![]()
![]()
## Installation
1. **Clone the repository:**
```bash
git clone https://github.com/NishalNT/NewsApp-Android.git
```
2. Open the project in Android Studio:+ Open Android Studio
+ Select Open an existing Android Studio project
+ Navigate to the cloned repository directory and select it
3. Get an API Key:
+ This app uses the NewsAPI to fetch news articles. You will need an API key from [https://newsapi.org](https://newsapi.org/).
+ Sign up on NewsAPI and get your API key.
4. Add the API Key to the project:
+ Open `util/Constants` and add the `api_key`
5. Run the app:
+ Connect your Android device or start an emulator
+ Click on the `Run` button in Android Studio
## Usage1
1. Home Screen:+ Displays the latest news articles in a list.
+ Click on any article to view its details.
2. Article Detail:
+ Displays the full content of the selected news article and click the `Favourite` Icon to save in the `Favourite Section`.
3. Search:
+ Use the search bar to find news articles based on keywords.
4. Favourite Section:
+ You may view your favourite News and you may swipe `right` or `left` to remove from favourite list.
## Architecture
The app follows the MVVM (Model-View-ViewModel) architecture pattern to ensure a clean separation of concerns and to make the code more maintainable.
+ Model:
+ Represents the data layer of the application. It includes data classes and repository classes that handle data operations.
+ View:
+ Represents the UI layer of the application. It includes Activities and Fragments that display data to the user.
+ ViewModel:
+ Acts as a bridge between the Model and the View. It holds the data and business logic, exposing it to the View.
## Libraries Used
+ Retrofit: For network calls to fetch news data from the API
+ Glide: For image loading and caching
+ LiveData: For observable data holders
+ ViewModel: For managing UI-related data in a lifecycle-conscious way
+ RecyclerView: For displaying a list of news articles## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.