Open mdn993 opened 7 months ago
I also found this problem, it exists on both android 13 and 14, have you solved it?
J'ai également trouvé ce problème, il existe à la fois sur Android 13 et 14, l'avez-vous résolu ?
I didn't solve the permission problem, but I found another solution at the moment, if we don't specify the location, the compressed file is in the application cache, so I just delete the compressed file after uploading the file to the database. If your case is that the compressed file is moved to shared memory, in this case you need to resolve the authorization problem.
I have an OPPO A16s phone with Android 13 I added in my manifest file the permissions below: <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" tools:ignore="ScopedStorage" />
Here's a code snippet I used: Future _pickVideo() async {
_isVideoCompressed = false;
} When I click on FilePicker, a dialog box appears asking for access to images and videos, as long as I do not accept the permission, the compression works. If only I accept the permission, the compression no longer works.
Under Android 13, I see this on the console output: Caching from URI: content://media/picker/0/com.android.providers.media.photopicker/media/1000077196 D/FilePickerUtils(4441): File loaded and cached at:/data/user/0/com.lecteur.video/cache/file_picker/1000077196.mp4 D/FilePickerDelegate(4441): [MultiFilePick] File #0 - URI: /picker/0/com.android.providers.media.photopicker/media/1000077196
Under Android 8.1.0, console output: Caching from URI: content://com.android.providers.media.documents/document/video%3A14815 File loaded and cached at:/data/user/0/com.lecteur.video/cache/file_picker/VID-20231209-WA0085.mp4 D/FilePickerDelegate(18106): File path:[com.mr.flutter.plugin.filepicker.FileInfo@c947eb8]