android intent - how to send any data from activity to another activity? -


i have many activities , in mainactivity , there 2 button (b1-b2). in b1 (activity1) user write same data , after finish mainactivity , in b2 (activity2) date (activity1)

(activity1)

 intent = new intent(getapplicationcontext(), activity2.class);     i.putextra("new_variable_name","value"); 

(activity2)

bundle extras = getintent().getextras(); if (extras != null) {     string value = extras.getstring("new_variable_name");   }   

this code doesn't work me !!....any solve!!

from posts:

intent =new intent(info.this, graphdiag.class).putextra("new_variable_name", "value"); startactivity(i); 

to data

string value  = getintent().getstringextra(<stringname>); 

also here


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -