Open koenmuilwijk opened 3 days ago
Hi,
On Android 14 a new permission is required to read media. See https://developer.android.com/about/versions/14/changes/partial-photo-video-access
It is just a wild guess but ImagePicker
is requesting Manifest.permission.READ_EXTERNAL_STORAGE
and the Flutter uploader is requesting Manifest.permission.READ_MEDIA_VIDEO
. See https://github.com/apivideo/api.video-flutter-uploader/blob/main/android/src/main/kotlin/video/api/flutter/uploader/utils/Utils.kt#L10
You can check in your built AndroidManifest.xml
that you got both permissions. Did you add a read permission (Manifest.permission.READ_EXTERNAL_STORAGE
or Manifest.permission.READ_MEDIA_VIDEO
) in your application AndroidManifest.xml
?
Also, we can't directly use File
or XFile
because under the hood we are using some native parts. At some point, we will have to get the path from the File
or the XFile
.
Version
1.3.0
Environment that reproduces the issue
Is it reproducible in the example application?
Not tested
Reproduction steps
Expected result
When uploading a video an additional permission dialog is displayed on Android. However, in our use case we use ImagePicker for the user to select a file, so we don't need to ask for permission again.
Can we pass a direct link to the selected
XFile
orFile
instead of the path as string to prevent this?Upload video without additional file permission request (already done by
ImagePicker().pickVideo(...)
).Actual result
An additional permission request is displayed upon the call to
uploadWithUploadToken
which doesn't serve any function.Additional context
Android 14 and higher.
Relevant logs output
No response