Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/asifsanjary/interval_based_task_android_notification_manager_foreground_kotlin

Interval based task in android app with notification manager foreground kotlin
https://github.com/asifsanjary/interval_based_task_android_notification_manager_foreground_kotlin

android-application foreground-service kotlin-android notification-service

Last synced: about 1 month ago
JSON representation

Interval based task in android app with notification manager foreground kotlin

Awesome Lists containing this project

README

        

# Interval-based Task on Foreground Service

- Using count-down timer on Foreground Service.
- Mainly useful for small interval-based work where interval is less than 15 minutes and app needs to stay in Foreground
- Otherwise it's better to use WorkManager with Foreground Service.

Improvements
- As Count-down Timer uses it's own `handler`, maybe it's better to make a custom Count-down Timer with a reference to `handler`, so that more functionality can be added
- There may be other improvements, let me know here

References:
- https://developer.android.com/guide/components/services
- https://developer.android.com/guide/components/foreground-services
- https://stackoverflow.com/questions/10032003/how-to-make-a-countdown-timer-in-android