a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
362 stars 115 forks source link

Show message "Storage permission denied" on android 13 and 14 #101

Closed HanhVoS3Corp closed 5 months ago

HanhVoS3Corp commented 5 months ago

Hi everyone, I faced issue related storage permission when trimming video on android 13 and android 14. Step reproduces:

  1. I request needed permissions: android 13: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, ACCESS_MEDIA_LOCATION android 14: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, ACCESS_MEDIA_LOCATION, READ_MEDIA_VISUAL_USER_SELECTED
  2. I choosed a video from storage, get uri of that video.
  3. I used the lib to open Trimmer Video screen like this: TrimVideo.activity(mediaPath).start(controller, trimmerVideoActivityResult)
  4. The app show message "Storage permission denied" image

After that, I opened the source code of the library and found that the lib check READ_EXTERNAL_STORAGE and ACCESS_MEDIA_LOCATION for android 10 or higher. This way is not okay for android 13 and 14. image

Library version: 1.7.3

Please team help me this case, thanks.

a914-gowtham commented 5 months ago

@HanhVoS3Corp Hi, i think ACCESS_MEDIA_LOCATION is not needed for this library as it is used to fetch meta like latlng(location) of image/video.

so, i will remove it and will share a build version here.

a914-gowtham commented 5 months ago

@HanhVoS3Corp fixed in 1.7.18

a914-gowtham commented 5 months ago

I just noticed the library version you mentioned. seems like in that version android 13 permission changes were not handled.

use the latest version

HanhVoS3Corp commented 5 months ago

Thanks for helping. Have a good day !