android - I can't set repeating of AlarmManager using setExact() -
i tried set repeating alarmmanager using setexact. in activity:
alarmmanager alarmmanager = (alarmmanager) getsystemservice(context.alarm_service); intent intent = new intent(this, alarmreceiver.class); intent.setaction(action_alarm_retry); pendingintent sender = pendingintent.getbroadcast(this, 0, intent, pendingintent.flag_cancel_current); alarmmanager.setexact(alarmmanager.rtc_wakeup, 7000, sender);`
and in receiver after operations have:
public void onreceive(context context, intent intent){ //here operations... alarmmanager alarmmanager = (alarmmanager) context.getsystemservice(context.alarm_service); intent intent = new intent(context, alarmreceiver.class); intent.setaction(action_alarm_retry); pendingintent sender = pendingintent.getbroadcast(context, 1, intet, pendingintent.flag_cancel_current); alarmmanager.setexact(alarmmanager.rtc_wakeup, 7000, sender); }
but repeats time without foggiest pause... please!
Comments
Post a Comment