NewsApp is a modern, clean, and fully functional Android news reader application built with Kotlin. It fetches real-time headlines and articles from around the world using the powerful NewsAPI.org service.
Perfect for learning or extending modern Android development practices with clean architecture.
- Live News Feed – Get the latest headlines updated in real-time
- Multiple Categories – General, Business, Technology, Entertainment, Sports, Health, Science
- Smart Search – Search articles by keywords, topics, or sources
- Rich Article Detail – Full description, author, published date, source, image, and direct link to original article
- Beautiful UI/UX – Material 3 design with smooth animations, cards, and responsive layout
- Dark/Light Mode – Automatically follows system theme
- Offline Support – Articles are cached locally (Room database)
- Fast & Lightweight – Built with best performance practices
- Error Handling – Handles no internet, API errors, and empty states gracefully
- Pull-to-Refresh – Modern swipe-to-refresh on news list
- Language: Kotlin 100%
- Architecture: MVVM + Repository Pattern + Use Cases
- UI: Jetpack Compose (Modern declarative UI) / XML with RecyclerView + Material 3
- Networking: Retrofit 2 + OkHttp 3
- Dependency Injection: Hilt
- Asynchronous Programming: Kotlin Coroutines + Flow
- Image Loading: Coil (with crossfade & caching)
- Local Database: Room (for offline caching)
- JSON Parsing: Gson
- API Service: NewsAPI.org
- Navigation: Jetpack Navigation Component
- Other: ViewModel, LiveData/Flow, DataStore, Shimmer loading effects
- Android Studio Ladybug (2024.2.1) or newer
- Android SDK (minSdk = 24, targetSdk = 35 recommended)
- Free NewsAPI.org key → Get it here
- Clone the repository
git clone https://github.com/Sano7707/NewsApp.git cd NewsApp - Open in Android Studio File → Open → Select the cloned folder
- Create a file named
local.propertiesin the project root. - Add the following line:
NEWS_API_KEY=your_actual_api_key_here
- Click Sync Project with Gradle Files.
- Select a device or emulator (API 24+).
- Click the Run button ▶.
The app will automatically read the API key using BuildConfig.
The app follows Clean Architecture principles:
- Presentation Layer → UI (Compose/XML) + ViewModel
- Domain Layer → Business logic & Use Cases
- Data Layer → Repository (Remote + Local)
Flow:
UI → ViewModel → UseCase → Repository → (API / Room) → back to UI via Flow/StateFlow.
- Base URL: https://newsapi.org/v2/
- Endpoint used: /top-headlines
- Country: us (can be changed)
- Categories supported: All 7 categories
Contributions, issues, and feature requests are welcome!
- Fork the project
- Create your feature branch
git checkout -b feature/amazing-feature - Commit your changes
git commit -m "Add amazing feature" - Push to the branch
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License — see the LICENSE file for details.
Made with ❤️ by Sano7707
If you found this project helpful, please give it a ⭐ on GitHub!