When startactivityforresult is called in the tab activity to obtain the running result of the sub-activity, the onactivityresult method cannot be called back.
This usually happens in activitygroup (I guess, I haven't studied the source code) Because activitygroup enters the activity stack instead of the tab activity when the tab activity enters the sub-activity, the design should be reasonable, not a bug.
Solution:
1. Use in tab Activity
Getparent (). startactivityforresult (intent, request );
2. When the sub-activity. Finish returns, onactivityresult is implemented in activitygroup. The content is similar:
@ Override protected void onactivityresult (INT requestcode, int resultcode, intent data) {// pass youractivity currentactivity = (youractivity) getlocalactivitymanager () down (). getcurrentactivity (); currentactivity. onchildactivityresult (requestcode, resultcode, data );}
Onchildactivityresult is a self-implemented method used to process the returned results.
Refer:
Http://stackoverflow.com/questions/6677466/stuck-with-getting-camera-pic-when-using-the-tab-activity