Skip to content Skip to sidebar Skip to footer

Mediascanner And Scopedstorage On Sdk-29

the app i'm working on uses a File as a target for photo capturing. this is executed externally by user selecting a camera-app using Intent(ACTION_IMAGE_CAPTURE). since upgrading

Solution 1:

Apps targeting Android 10 (API level 29) and higher are given scoped access into an external storage device, or scoped storage, by default.

so you need to make it compatible with scopedStorage but you can use this temporary approach for now mentioned in Google Android Developers guide.

Before your app is fully compatible with scoped storage, you can temporarily opt out based on your app's target SDK level or the requestLegacyExternalStorage manifest attribute:

<manifest... ><!-- This attribute is "false" by default on apps targeting
       Android 10 or higher. --><applicationandroid:requestLegacyExternalStorage="true"... >
    ...
  </application></manifest>

visit this link for more info: https://developer.android.com/training/data-storage/files/external-scoped

Post a Comment for "Mediascanner And Scopedstorage On Sdk-29"