Skip to content

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.

License

Notifications You must be signed in to change notification settings

NishalNT/NewsApp-Android

Repository files navigation

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

  • 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

Headlines Headlines 2 Favorites

Installation

  1. Clone the repository:

    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.
    • 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.
  1. Article Detail:
  • Displays the full content of the selected news article and click the Favourite Icon to save in the Favourite Section.
  1. Search:
  • Use the search bar to find news articles based on keywords.
  1. 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 file for details.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages