onCreate() gets called when reopen from recent task after permission settings is changed

前端 未结 3 2030
离开以前
离开以前 2021-02-20 07:44

The question title may sounds complicated but here is my situation.

I have a map fragment within an activity. Simple. turn on Storage permission to allow display of Map,

3条回答
  •  孤街浪徒
    2021-02-20 07:51

    The workable solution now is just to call getSupportFragmentManager().popBackStackImmediate(); in onCreate() of the Activity to prevent from trying to recreate the map fragment.

    popBackStack() won't work in this case as it is asynchronous.

提交回复
热议问题