Reputation: 727
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'
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
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