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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -