Can anyone kindly list what are the values of requestCode to be passed with startActivityForResult() and their purpose? Also, can you explain on the setResult parameters available like RESULT_OK and what else are there? Kindly help.
Can anyone kindly list what are the values of requestCode to be passed with
Share
When you launch an activity for result with
requestCode >= 0, this code will be returned to the First Activity’sonActivityResult()when second activity is finished.You can start multipleActivityfor result from yourActivity. In each case you get the callback tostartActivityForResult()method passing the requestCode. InonActivityResult()we can use the requestCode to find out for which activity we have received the callback. So to differentiate between the callbacks fromActivitieswe use different requestCodes.For eg: