The Lollipop API represents setAlarmClock
method to charge an intent.
to start in I can use this code:
am.setAlarmClock(new AlarmManager.AlarmClockInfo(nexttime,pi), pi);
to cancel:
am.cancel(PendingIntent.getService(ctx, 0, intentS, 0));
but how to check whether it was already charged?
In common case I can use this:
boolean alarmUp = (PendingIntent.getBroadcast(ctx, 0, intent, PendingIntent.FLAG_NO_CREATE) != null);
but what about this new method? Does it works properly for setAlarmClock
on pure set
method?