John
John

Reputation: 727

Android target sdk 33, READ_MEDIA_VIDEO not working

I have requested below two permissions in app,

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO " />

Then I allow the permissions, and verify from 'App permissions'

enter image description here

But, the app still dont have the READ_MEDIA_VIDEO permission, e.g the below code return false. And the app cannot access/read the videos from device.

ContextCompat.checkSelfPermission(
        context!!,
        Manifest.permission.READ_MEDIA_VIDEO
    ) == PackageManager.PERMISSION_GRANTED

Upvotes: 1

Views: 5220

Answers (1)

Sandesh Khutal
Sandesh Khutal

Reputation: 1809

If your app only needs to access images, photos, and videos, consider using the photo picker instead of declaring the READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions.

More details available here

According to Google storage documentation. It seems that for non-media files no permission is needed.

Upvotes: 1

Related Questions