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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -