How to Avoid User Confirmation Popup When Using addAssetsToAlbumAsync in Android >= 13?

50 views Asked by At

I'm developing an Android application targeting Android 13 and encountering an issue with the MediaLibrary library.

Specifically, when I execute await MediaLibrary.addAssetsToAlbumAsync([asset], album, false), it triggers a user confirmation popup asking to allow or deny the operation.

I believe this behavior might be related to scoped storage. I'm aware that setting the copy flag to "true" avoids the popup by copying the asset instead of moving it, but this is not an ideal solution for my use case. Is there an alternative method or workaround to prevent this confirmation popup?

"expo": "^49.0.0" "expo-camera": "^13.6.0" "expo-media-library": "^15.9.1"

0

There are 0 answers