android - how to recieve the second activity intent on first activity -


i have created 2 activities,first activity comes , goes second page i.e. second activity,and second activity goes on first,what wanted when 2 activity goes first has data display in first activity.how can please help.thanks in advance.

just sample code:

intent intent = new intent(firstactivity.this, secondactivity.class); bundle b = new bundle();  b.putint("key", 1);  intent.putextras(b);  startactivity(intent);  finish(); 

after it, can data in second activity:

bundle b = getintent().getextras();  int value = b.getint("key", 0); 

Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -