News aggregator app built using Jetpack Compose with Bonai News API
- Get the Bonai News API for free from here https://rapidapi.com/bonaipowered/api/news-api14
- Add the api key to
ApiKey.ktfile insideapp/src/main/java/com/trend/now/(Need to create the file manually)
package com.trend.now
const val apiKey = "your-api-key"- Run the app (currently using Android Studio Ladybug Feature Drop | 2024.2.2)
- Display trending news based on user selected topic
- Local news, display trending news based on user selected county and language.
- TBA
- News cache using
OkHttpcache andRoomdatabase - Automatically detect device location and language to be used for local news preference
- Save user preference on local using
DataStore - TBA
![]() |
![]() |
| Home | Local news |
|---|---|
![]() |
![]() |
| OnBoarding | Settings |
|---|---|
![]() |
![]() |
Series of medium articles how I built the app
- Part 1 - TrendNow: Build an Android News App with Jetpack Compose
- Part 2 - Add News Topics to TrendNow: Implement Horizontal Scroll in LazyColumn Jetpack Compose
- Part 3 - Filter News in TrendNow: Save Data with DataStore and Optimize Recomposition
- Part 4 - Load More News in TrendNow: Implement Infinite Scroll in LazyColumn Jetpack Compose
- Part 5 - Cache on the Client Side in TrendNow: Implement Room Database
- Part 6 - Handle API Limits in TrendNow: Implement OkHttp Cache for Client-Side Caching
- Part 7 - Enhance Client-Side Caching in TrendNow: Combine OkHttp Cache and Room Database
- Part 8 - Local News in TrendNow: Handle Multiple Sections in LazyColumn Jetpack Compose
- Part 9 - Optimize Pagination in TrendNow: Paging 3 with OkHttp Cache
- more coming...





