Skip to content

A simple RSS feed reader app (written in Kotlin and Jetpack Compose) that currently reads my blog (Android Kotlin Weekly)'s feed.

License

Notifications You must be signed in to change notification settings

vinchamp77/AndroidNews

Repository files navigation

Simple RSS Feed Reader (Android Kotlin Weekly)

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.

Features

  • 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

Current Status

  • Add login authentication

Requirements

  • Android Studio Koala or later

Tech Stack

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 layer
Combine 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

Articles

Branches

  • 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)

google-play-badge.png

License

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.

About

A simple RSS feed reader app (written in Kotlin and Jetpack Compose) that currently reads my blog (Android Kotlin Weekly)'s feed.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages