Use workmanager and foreground service to stay app alive in all versions and wake up app periodically.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
app fix npe Jan 14, 2019
gradle/wrapper init Jan 11, 2019
.gitignore update Jan 11, 2019 update Jan 11, 2019
build.gradle init Jan 11, 2019 init Jan 11, 2019
gradlew init Jan 11, 2019
gradlew.bat init Jan 11, 2019
settings.gradle init Jan 11, 2019

This is a workmanager demo for stay app alive or wake up the app periodically. In some ROMs, it may not be useful because the task manager of them is like the force stop operation in phone settings. The foreground service is useful for all versions and ROMs.