Monday 15 July 2013

broadcastreceiver - AlarmManager does not fire PendingIntent - Android -


I have created a class to set up alarm manager and have received it with a broadcast receiver, but this work does not do. I have already tried different types of alarms manager to set up, but nothing worked. Of course, Broadcast receiver works fine if I call it any other way.

  Public class Alarmbrastcast receivers extend broadcast broadcast receivers {@ Override response to public null (reference reference, intention intent) {If (intent == blank) {log D. ("INFO", "Intent is empty"); } If (reference == faucet) {log d. ("Information", "Reference is Zero"); } If (intention! = Null & amp; context! = Null) {log d. ("Information", "Alarm Manager Removed ..."); }} Public static void startAlarm {if (PendingIntent.getBroadcast (Reference, 0, New Intro (Reference, AlarmBroadcastReceiver.class), PendingIntent.FLAG_NO_CREATE) == Faucet} {Log.d ("Information", "AlarmManager Set ... "); AlarmManager AlarmManager = (AlarmManager) context.getSystemService (Event .ALARM_SERVICE); AlarmManager. Setting (alarm manager. RTC_wekup, SystemClock.Packaging Realtime (), 10000, PendingIntext.txtbodcast (reference, 0, new intent (reference, alarmbrastcastreserve class), 0)); }}}  

I hope you can help me! Thanks: D

You are using RTC_WAKEUP , but your time The base is shown as SystemClock.elapsedReautime () . They do not match ELAPSED_REALTIME_WAKEUP or the time change for the event is also used on the basis of System.currentTimeMillis () or things that it is (e.g., Use of java.util.Calendar ).

Also, confirm that your AlarmBroadcastReceiver is registered in the manifest, and you see or have any LogCat messages related to your problem.


No comments:

Post a Comment