Set values by Putextra, get values by Getextra
Putextra need to set the key-value pair, Getextra by the corresponding key to get the passed value (directly between the Getextra plus the value type you want to get)
1. Open another activity in one activity through Startactivityforresult ()
2. This method usually receives two parameters, the first one is the intent object, the second is the Requestcode
3. In the first activity, rewrite the Onactivityresult method, by switch to determine the transmitted requestcode (which activity is passed back), usually also need to judge ResultCode (return result value), To perform the appropriate operation
4. In the activity that is opened, you can get the data passed in by Getintent (). Getextra
5. Finally, you can return data via Setresult to the activity that opened it by using a button setting in the activity that was opened.
6. The method has two parameters, the first is the ResultCode, the second is the intent object, and then the finish () drop can show the activity that opened it.
Data transfer between the activity of Android development