Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Android get previous activity
- Intent intent = new Intent(this, next.class);
- intent.putExtra("activity","first");
- startActivity(intent);
- Intent intent = getIntent();
- String activity = intent.getStringExtra("activity");
- Intent i = new Intent(this, deliveries.class);
- i.putExtra("ActivityName", "ActivityOne");
- startActivity(i);
- Bundle extra = getIntent().getExtras();
- String activityName= Long.parseLong(extra.getSerializable("ActivityName")
- toString());
- public ComponentName getCallingActivity()
- Intent i = new Intent(Activity1.this, MainActivity.class).putExtra("from", "activity1");
- startActivity(i);
- if(getIntent().getStringExtra("from").equals("activity1")){
- //From Activity 1
- }else {
- // Activity 2
- }
- startChildActivity("first", new Intent(this, First.class));
- getParent()
Add Comment
Please, Sign In to add comment