No description, website, or topics provided.
Java
Latest commit 575784d Jun 23, 2016 @fedepaol Added readme
Permalink
Failed to load latest commit information.
app Removed unnecessary permission Jun 21, 2016
gradle/wrapper
.gitignore
LICENSE Initial commit Jun 20, 2016
README.md Added readme Jun 23, 2016
build.gradle
gradle.properties Initial import Jun 20, 2016
gradlew Initial import Jun 20, 2016
gradlew.bat
settings.gradle

README.md

Sample timer app

This sample timer app shows the correct way to implement a long running timer in Android. This is intended to be a sample to the approach described in my blogpost here.

From the blogpost:

The idea is to run the countdown timer as long as the app is foregrounded, showing the progress to the user one second at the time, but set a system alarm whenever the app goes in background. Whenever the user gets back to the app, you'll cancel the system alarm and restart the timer from where it is supposed to start.

From the user's perspective, the timer is running even if the app is in background, because whenever he returns to the app he sees what he is expecting to see (the time passed). On the other hand, if the timer expires when the app is in background, a friendly notification will remind him that he has to take the plum cake out of the oven.