Anytime you need to pass data between two activities you will need to work with an intent (as I’ve mentioned in the previous few tutorials). You will be able to put extras into the intent so that the opening (or receiving) activity will be able to get the data from the intent through a variety of different methods. Passing data is as easy as setting up your base intent, and adding extra data, by intent.putExtra(“yourExtraName”, yourExtraValue); and getting that data by intent.getStringExtra(“yourExtraName”);
Read full article from Passing Data with Android Intent Extras | mybringback tutorials | mybringback
No comments:
Post a Comment