A modern Android news app that brings the engaging swipe interaction of Tinder to news browsing. Swipe right to save articles, swipe left to skip them!
- Tinder-Style Swipe Interface: Swipe right to save, left to skip
- Firebase Authentication: Email/Password and Google Sign-In
- Real-Time News: Fetch latest headlines from NewsAPI.org
- Offline Mode: Access saved articles without internet
- Category Filters: Browse by Technology, Sports, Business, etc.
- Share Articles: Share via WhatsApp, Gmail, or any installed app
- Dark Mode: Eye-friendly theme toggle
- 100% Java: No Kotlin - pure Java implementation
- MVC Architecture: Clean separation of concerns
- Firebase Firestore: Cloud database with offline persistence
- Retrofit + Gson: Type-safe REST API integration
- Material Design: Modern UI/UX with smooth animations
- Firestore Security Rules: User-specific data access control
[Login Screen] โ [News Feed] โ [Saved Articles] โ [Settings]
| Component | Technology |
|---|---|
| Language | Java |
| Architecture | MVC (Model-View-Controller) |
| Authentication | Firebase Auth |
| Database | Cloud Firestore |
| API Client | Retrofit 2 + Gson |
| Image Loading | Glide |
| Swipe Cards | CardStackView |
| UI Framework | Material Design 3 |
| Location Services | Google Play Services (Optional) |
// Firebase (with BoM for version management)
implementation platform("com.google.firebase:firebase-bom:32.7.0")
implementation "com.google.firebase:firebase-auth"
implementation "com.google.firebase:firebase-firestore"
implementation "com.google.firebase:firebase-messaging"
// Networking
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
// Image Loading
implementation "com.github.bumptech.glide:glide:4.16.0"
// Card Stack View
implementation "com.github.yuyakaido:CardStackView:2.3.4"
// Material Design
implementation "com.google.android.material:material:1.11.0"app/src/main/java/com/nmims/bigmanting/
โโโ activities/
โ โโโ LoginActivity.java # Authentication UI
โ โโโ MainActivity.java # News feed with swipe cards
โ โโโ SavedActivity.java # Display saved articles
โ โโโ SettingsActivity.java # App settings & preferences
โโโ adapters/
โ โโโ CardAdapter.java # Card stack adapter
โ โโโ SavedAdapter.java # Saved articles adapter
โโโ helpers/
โ โโโ FirestoreHelper.java # Firestore CRUD operations
โ โโโ NewsApiService.java # Retrofit API interface
โ โโโ RetrofitClient.java # Retrofit singleton
โโโ models/
โ โโโ ArticleModel.java # Article POJO
โ โโโ SourceModel.java # News source model
โ โโโ NewsResponse.java # API response model
โโโ services/
โ โโโ NewsNotificationService.java # FCM push notifications
โโโ utils/
โ โโโ Constants.java # App constants & security rules
โ โโโ SharedPrefsHelper.java # SharedPreferences wrapper
โโโ SwipeNewsApplication.java # Application class (Firestore init)
- Android Studio Hedgehog or later
- JDK 11+
- Android device/emulator (API 25+)
- NewsAPI account (free)
- Firebase account (free)
-
Clone the repository
git clone https://github.com/DishankVyas/Swipe-News-App cd bigmanting -
Get NewsAPI Key
- Register at newsapi.org
- Copy your API key
- Update
Constants.java:public static final String NEWS_API_KEY = "your_key_here";
-
Set up Firebase
- Create a Firebase project at console.firebase.google.com
- Add Android app with package name:
com.nmims.bigmanting - Download
google-services.jsonand place inapp/directory - Enable Authentication (Email/Password and Google)
- Create Firestore database
- Add security rules from
FIRESTORE_RULES.txt
-
Configure Google Sign-In
- Get SHA-1 fingerprint:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android - Add SHA-1 to Firebase Console
- Copy Web Client ID to
strings.xml
- Get SHA-1 fingerprint:
-
Build and Run
./gradlew assembleDebug
For detailed setup instructions, see SETUP_INSTRUCTIONS.md
- Launch app
- Register with email/password OR sign in with Google
- Upon successful login, you'll see the news feed
- View news articles displayed as swipeable cards
- Swipe right to save an article
- Swipe left to skip an article
- Use category chips to filter by topic
- Tap the bookmark FAB on the main screen
- View all your saved articles
- Tap an article to open in browser
- Tap share to share via apps
- Tap delete to remove from saved
- Open menu โ Settings
- Toggle dark mode
- Enter custom NewsAPI key (optional)
- Logout when done
The app uses strict Firestore security rules to ensure data privacy:
match /users/{userId}/saved_articles/{article} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}This ensures users can only access their own saved articles.
SwipeNews works offline thanks to Firestore's persistence:
- Saved articles are cached locally
- Changes sync automatically when online
- No data loss during offline periods
Enable in SwipeNewsApplication.java:
FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
.setPersistenceEnabled(true)
.build();- Top Headlines:
/v2/top-headlines- Parameters: country, category, apiKey
- Everything:
/v2/everything- Parameters: q, language, sortBy, apiKey
- General
- Technology
- Business
- Sports
- Entertainment
- Health
- Science
For a complete demo script with talking points, see DEMO_SCRIPT.md
| Criteria | Implementation | Weight |
|---|---|---|
| Design & UI/UX | Material Design, smooth animations | 15% |
| Functionality | Auth, API, swipe, save, share, offline | 20% |
| Innovation | Tinder-style news browsing | 10% |
| Technical Complexity | Multiple tech stack integration | 15% |
| Security | Firebase Auth, Firestore rules | 10% |
| Testing | Offline mode, sync tested | 10% |
| Documentation | Complete guides & comments | 15% |
- Location-based trending news
- Search functionality
- Article categories for saved items
- Push notifications for breaking news
- User preferences for news sources
- Article summary using ML
- Social sharing statistics
- NewsAPI Free Tier: 100 requests/day
- Image Loading: Depends on article source quality
- Offline Articles: Only previously saved articles available offline
Q: App crashes on launch
- Verify
google-services.jsonis inapp/directory - Check Logcat for specific errors
Q: Google Sign-In fails
- Add SHA-1 fingerprint to Firebase Console
- Download updated
google-services.json
Q: No articles loading
- Verify NewsAPI key is correct
- Check internet connection
- Check Logcat for API errors
See SETUP_INSTRUCTIONS.md for more troubleshooting tips.
- NewsAPI.org for news data
- Firebase for backend services
- CardStackView for swipe UI
- Glide for image loading
Ready to swipe through the news? ๐๐ฑ