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
Post a Comment