I have a server running that notifies the user with a statusbar notification that opens my main activity, how can I pass data to my activity trough that intent?
MainActivity
Intent intent = new Intent(MainActivity.this,SecondActivity.class); intent.putExtra("extra_text", string); startActivity(intent);
SecondActivity
String text = getIntent().getStringExtra("extra_text");
2.1m questions
2.1m answers
60 comments
57.0k users