This is a simple RSS feed reader app that currently reads my blog (Android Kotlin Weekly)'s feed - rss.xml. It is written in Kotlin and Jetpack Compose.
This app is work in progress and may be over-engineered to showcase the best practices (use cases for example) and diverse array of technologies.
- Fetch articles from RSS feed
- Bookmark articles
- Share articles
- Mark articles as read / unread
- Search articles
- New article arrived notification
- Deep link support for all article URLs
- Google Play in-app rating & review
- Add login authentication
- Android Studio Koala or later
Tech Stack | High-level Implementation Description |
---|---|
Jetpack Compose | Implement reactive UI using composable functions |
Recommended App Architecture | Seperate the app into UI, domain and data layers |
ViewModel | Act as state holder in UI layer (expose state as StateFlow )Survive through configuration changes |
OkHttp | Fetch rss.xml Replace Ktor Client which crashes on API 21 |
Room Database | Cache the article data from the rss.xml |
Proto DataStore | Store user preferences - e.g. bookmarked articles, read articles |
Coil | Load images from URL |
XmlPullParser | Parse the rss.xml |
Compose Navigation | Navigate to different screens in the app |
Scaffold | Implement top, bottom and snack bars based on material design layout Implement navigation graph |
AndroidView & WebView | Embed the web browser into the app |
Coroutines | Implement asynchronous flow in the app |
Flow | Expose Flow in data layerCombine multiple flows (i.e. articles flow, user preferences flow and search query flow) into single flow |
StateFlow | Expose StateFlow in ViewModel |
Accompanist System UI Controller | Set system bars color |
Accompanist Permissions | Request post notification runtime permission |
PullRefresh | Show article referesh indicator (was migrated from Accompanist SwipeRefresh ) |
WorkManager | Schedule background tasks to fetch articles from rss.xml |
Notification | Request notification runtime permission (API >=33) Post new article arrived notification |
Deep Link | Add main blog, article and about URL deep links into the app Implement partial deep links(link is not verified due to I don't own the blog's domain) |
BuildUtils (own library) | Avoid hardcoding build version code (API level) to improve code readability |
New Splash Screen | Implement new splach screen based on API >= 31 that works on all previous API levels |
Google Play In-App Reviews API | Implement Google Play in-app rating & review dialog |
Spotless Plugin | Automate code formatting for Kotlin and copyright text |
- Simple RSS Feed Reader - Jetpack Compose
- Simple Jetpack Compose Navigation Example
- How to Add Bottom Navigation in Jetpack Compose?
- Convert View Model to Use Hilt Dependency Injection
- Implement Default Splash Screen Prior to Android 12
- Simple Example to Use WorkManager and Notification
- Exploring Different Ways to Collect Kotlin Flow
- Convert Flow to SharedFlow and StateFlow
- Kotlin Flow - Combine, Merge and Zip
- How to Add Deep Links in Jetpack Compose?
- How to add Google Play In-app Review Dialog?
- How to Request Android Runtime Permissions using Jetpack Compose?
- How to Add Spotless Code Formatter to your Android Project?
- Convert KAPT to KSP - Room and Hilt Examples
- master - multiple view models, use recommended way to collect flow
- master_org - single view model (previous implementation, not updated anymore)
- master_org_hilt - convert view model to use hilt (diff, not updated anymore)
Copyright 2023 Vincent Tsen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.