how to directly pass value of a variable from 1st activity to 3rd activity using putextra?
For example:
I have a variable A in the first screen (first activity) if I hit the button it will show the 2nd screen. The 2nd screen(2nd activity) has a button. If I click the button it will open the 3rd screen(3rd activity) and it will show the variable A in the textview of 3rd screen (3rd activity).
how can I pass the value of variable A from the first screen DIRECTLY to the third screen(third activity). (1st->3rd)
is it possible to directly pass the value ? or should I pass it in 2nd activity first before passing to 3rd activity (1st->2nd->3rd)
Actually its not possible to go from 1st activity to 3rd directly…
You must have to follow the activity stack..
So if you want the data to be passed from 1st to 3rd follow by
1st -> 2nd -> 3rd
with the use of intent suggested by @Lalit Poptani