Widgets allow to use Chronometer
through RemoteViews
. However, I see only a constructor and count down mode change there. No setOnChronometerTickListener
, unfortunately. I wanted to fire UI update when chronometer’s countdown reaches 0. Currently, it just goes down in negative side after reaching 0 seconds threshold. Is it possible?
If setOnChronometerTickListener
is not possible in widgets, then would it be a good idea to set an AlarmManager
precisely when countdown is supposed to reach 0 so we can update the UI at this moment? I understand that I’d need additional permissions (I have them). If this is a good approach then we still face the problem that during update user might see negative chronometer (as this is not happening at exact moment in just one sight). We could hideby not showing seconds on chronometer, but it doesn’t react to format
parameter in constructor even when just hours and minutes set.
Researching all the docs on Chronometer
, CountDownTimer
and widgets periodic updates.