Using data from context providers or requesting Google Photos read permission?

后端 未结 6 1301
陌清茗
陌清茗 2020-12-05 07:34

My app allows users to import their photos and videos from other apps. Now that Google replaced Google+ Photos with Google Photos, couple of things broke for me. One of thes

6条回答
  •  醉话见心
    2020-12-05 07:51

    Yep, this is by design, as described on Android Developer site.

    For security reasons, the permissions are temporary, so once the client app's task stack is finished, the file is no longer accessible. You must get the file data when you receive the intent answer, in the onActivityResult method. Store a copy of the file data, because the file won't be available anymore when onActivityResult returns.

提交回复
热议问题