Welcome to NewsApp — a modern Android application built with Jetpack Compose that brings you the latest headlines from around the world. Stay updated with real-time news, browse by categories, and enjoy a secure authentication system powered by Firebase Authentication.
- 🔐 Firebase Authentication: Sign up, Sign in, and Sign out securely with email/password
- 🗞️ Top Headlines: Get the latest breaking news in real-time
- 📂 News Categories: Browse by topics: General, Business, Technology, Sports, Health, Science, Entertainment
- 🔍 WebView Reader: Read full articles inside the app with smooth navigation
- 🎨 Modern UI: Clean, customizable interface with Material 3 design
- 🌙 Dark/Light Theme Support for a better reading experience
- ❤️ Session Handling (sign-out, re-login logic present in ViewModel)
- 🔄 Pull-To-Refresh for news feed
- 🚀 Composable Architecture using ViewModels & State Management
- Kotlin
- Jetpack Compose
- Material 3
- Firebase Authentication
- Retrofit + Gson (REST API, JSON parsing)
- NewsAPI.org (News Provider)
- Coil (Async image loading)
- AndroidX Lifecycle + ViewModel + Coroutine
-
Clone this repository
-
Open in Android Studio (latest stable).
-
Add API Key for NewsAPI:
- Get your API key from NewsAPI.org.
- Add it inside your
NewsViewModel.ktor inlocal.properties:INSERT YOUR NEWS API HERE = your_api_key_here
- Configure Firebase Authentication:
- Go to the Firebase Console.
- Create a new Firebase project (or select an existing one).
- Click Add App → Android.
- Enter your Android package name (must match
app/build.gradle). - Download the google-services.json file when prompted.
- Enter your Android package name (must match
- Move the file into your project under:
app/google-services.json - In Firebase Console → Authentication → Sign-in Method, enable Email/Password Authentication.
- Update Gradle for Firebase:
- In project-level
build.gradle:buildscript { dependencies { classpath 'com.google.gms:google-services:4.3.15' } } - In app-level
build.gradle:plugins { id 'com.android.application' id 'com.google.gms.google-services' id 'org.jetbrains.kotlin.android' } - Sync Gradle to download dependencies.
- Run the app 🚀 on an emulator or a physical device.
❤️ Whether you’re exploring Firebase Auth, Retrofit + Compose integration, or just love beautiful reading apps — feel free to fork, contribute, and share! PRs are always welcome. ❤️