Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing data from intent service to activity

I have a broadcast receiver from which am calling intentservice.I want to send the data received in the intentservice to a activity.String s=extras.getString("Notice").I want to send this received string to a new activity

like image 905
user3790145 Avatar asked Nov 10 '22 01:11

user3790145


1 Answers

@Override
protected void onHandleIntent(Intent arg0) {
   Intent dialogIntent = new Intent(getBaseContext(), myActivity.class);
    dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
     dialogIntent.putExtra("value", extras.getString("Notice"));
     getApplication().startActivity(dialogIntent);
}   
like image 123
George Isaac Avatar answered Nov 14 '22 21:11

George Isaac