onActivityResult is not being called in Fragment

后端 未结 30 2620
忘了有多久
忘了有多久 2020-11-21 04:28

The activity hosting this fragment has its onActivityResult called when the camera activity returns.

My fragment starts an activity for a result with th

30条回答
  •  一向
    一向 (楼主)
    2020-11-21 05:09

    I can add two advices if someone still cannot make it. In Manifest.xml file, make sure the hosting activity didn't finish when call back and the activity to be started has the launch mode as standard. See details as below:

    For Hosting activity, set the no history property as false if have

    android:noHistory="false"
    

    For Activity to be started, set the launch mode as standard if have

    android:launchMode="standard"
    

提交回复
热议问题