I use startActivity() to begin a new Activity within my application and would like to find a way to either poll for or be notified when the started Activity exits. Is this possible?
Clarification: The Intent passed into startActivity will be using ACTION_VIEW.
startActivityForResult()
is the method you want to use.
After your Activity
completes a callback will be made to the calling Activity
for onActivityResult()
, where you can then process the returned data from the closed Activity
.
The documentation for Activity
details pretty well how you can do this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.