android - Intent passed into onHandleIntent is missing intent extras that I set -


i creating intent , adding string it, create pendingintent, given alarm manager execute:

string value = "somevalue";  intent intent = new intent(this, fetchservice.class); intent.putextra(appconstants.key, value);  alarmintent = pendingintent.getservice(this, 0, intent, 0); 

up until point, fine, , checked debugger set. next, when onhandleintent(intent) called inside service, doesn't seem exist anymore

@override protected void onhandleintent(intent intent) {     // app crashes here     string value = intent.getstringextra(appconstants.key);      ... } 

i can't seem figure out why not there. have missed something?

thanks.

was missing pendingintent.flag_update_current when creating pendingintent karakuri pointed out.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -