SkillAgentSearch skills...

AndroidTimerSample

No description available

Install / Use

/learn @fedepaol/AndroidTimerSample
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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.

Related Skills

View on GitHub
GitHub Stars12
CategoryDevelopment
Updated6y ago
Forks1

Languages

Java

Security Score

70/100

Audited on Oct 9, 2019

No findings