What Is Onactivityresult in Android?

What Is Onactivityresult in Android?

The android startActivityForResult method, requires a result from the second activity (activity to be invoked). In such case, we need to override the onActivityResult method that is invoked automatically when second activity returns result.

What is onActivityResult?

onActivityResult is the callback you have on the first activity to grab the contacts you choose.

Why is onActivityResult not called?

Since Activity gets the result of onActivityResult() , you will need to override the Activity 's onActivityResult() and call super. onActivityResult() to propagate to the respective Fragment for unhandled results codes or for all. If above 2 options do not work, then refer option 3 as it will definitely work.

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.