Hi all,
I want to set an alarm in my application which will be triggered each day. According to the doc, I have to set a one-time alarm, and in the BroadcastReceiver which will receive the alarm signal, reset the alarm for the day after. Is that correct ?
My BroadcastReceiver handles well the wakelock and launch a service which releases this wakelock. Everything works fine here.
However I have problems. In my application there is a checkbox which is checked when alarm is up. To know if my alarm is up, I use the following condition :
Intent intent = new Intent( context, AlarmReceiver.class );
boolean alarmUp = (
PendingIntent.getBroadcast( context, 0, intent, PendingIntent.FLAG_NO_CREATE) != null)
But this doesn't seem to work very well, is that a good way to know if an alarm is up ?
Thanks in advance