android - how to send extras to an activity with Intents? -
i have broadcastreceiver listens incoming sms messages. while new sms arrives, displays notification user can click on , open app. want pass message text activity. inside receiver: notification notifacation = new notification(); notifacation.icon = icon; notifacation.tickertext = tickertext; notifacation.when = system.currenttimemillis(); bundle bundle = new bundle(); bundle.putstring("sms_parameters", smsparameters); intent notificationintent = new intent(context, myactivity.class); notificationintent.putextra("sms_parameters", bundle); pendingintent contentintent = pendingintent.getactivity(context, 0, notificationintent, 0); notifacation.setlatesteventinfo(context, tickertext, message, contentintent); notificationmanager.notify(1, notifacation); inside activity: @override public void onresume() { bundle bundle = this.getintent().getextras(); if( bundle != null) { string smsparameters = bundle.getstring("sms_parameters");