Android cannot pass intent extras to AlarmManager -


i thought this solve problem, doesn't.

i have code send alarm:

public void triggeralarm() {     alarmmanager alarmmanager = (alarmmanager) getcontext().getsystemservice(alarm_service);     alarmmanager = (alarmmanager) getcontext().getsystemservice(alarm_service);     intent intent = new intent(getcontext(), alarmreceiver.class);     intent.putextra("id", nextdue.id.get() + "");     string passed = intent.getstringextra("id");     log.d("debrrug", "the im passing: " + passed);     pendingintent pendingintent = pendingintent.getbroadcast(getcontext(), i++, intent, pendingintent.flag_update_current);     alarmmanager.set(alarmmanager.rtc_wakeup, soonest.duetime.get(), pendingintent); } 

my debrrug statement indicates being passed 8.

this alarm receiver:

@override     public void onreceive(context context, intent intent) {         string passed = intent.getstringextra("id");         log.d("debrrug", "the im receiving: " + passed);     } 

here, debrrug statemnt indicates im receiving null.

note: could, possibly, interesting triggeralarm method being called within contentprovider. don't know if helps understand problem better or not.

i found it. wow! sending alarm in area of code, wasn't putting on.

doing ctrl f -> ".set(alar" let me track down little bastard.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -