A quick demo of implicit and explicit intents.
- Use startActivityForResult() to start the second Activity
- To return data from the second Activity:
- Create a new Intent
- Put the response data in the Intent using putExtra()
- Set the result to Activity.RESULT_OK or RESULT_CANCELED, if the user cancelled out
- Set result can has a version without an intent, just a code: setResult(RESULT_COLOR_RED);
- call finish() to close the Activity
- Implement onActivityResult() in first Activity
- https://stackoverflow.com/questions/20015950/can-we-call-startactivityforresult-from-adapterhow-to-get-the-response
- https://stackoverflow.com/questions/50700309/how-to-assign-onactivityresult-values-to-the-listview
Implement an Intetent filter