![]() The ActivityResult APIs were added to the Jetpack activity and fragment libraries, making it easier to get results from activities by providing type-safe contracts. This leads to complicated code, and it doesn’t provide a type-safe interface for expected arguments when sending or receiving data from an activity. Previously, to get results from started activities, apps needed to implement an onActivityResult() method in their activities and fragments, check which requestCode a result is referring to, verify that the requestCode is OK, and finally inspect its result data or extended data. We’ve recently released the new ActivityResult APIs to help handle these activity results. ![]() Whether you're requesting a permission, selecting a file from the system file manager, or expecting data from a 3rd party app, passing data between activities is a core element in inter-process communication on Android. ![]() Posted by Yacine Rezgui, Developer Advocate
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |