2012年3月29日木曜日

Alarm Manager

I am programming an application using a daily timer with Alarm Manager.

For test, I set its interval to one minute.  Its almost works good.

After that, I set the interval to one day.  It didn't work.

Now I understood it was caused by the method AlarmManager#setInexactRepeating().

Its inexactness depends on its interval, maybe.

So, inexact-range of daily is too wide.  It could not be used for daily timer.

I will use AlarmManager#setRepeating().  It spends the battery more than that, but is exact.

0 件のコメント:

コメントを投稿