ultralytics / yolo-flutter-app

A Flutter plugin for Ultralytics YOLO computer vision models
https://ultralytics.com
GNU Affero General Public License v3.0
106 stars 41 forks source link

Storage Permission Error on Android 11 #74

Open isabinimam opened 2 weeks ago

isabinimam commented 2 weeks ago

when running this code on android 11, the app's only asking for camera permission. there's no asking storage permission. When i give storage permission manually the error still insist. "Error requesting permissions".

this is the run log: Launching lib\main.dart on CPH1911 in debug mode... Running Gradle task 'assembleDebug'... √ Built build\app\outputs\flutter-apk\app-debug.apk Installing build\app\outputs\flutter-apk\app-debug.apk... Debug service listening on ws://127.0.0.1:55805/ICxcpbQrjqQ=/ws Syncing files to device CPH1911... I/cs_yolo_exampl( 8970): Compiler allocated 4649KB to compile void android.view.ViewRootImpl.performTraversals() D/permissions_handler( 8970): No permissions found in manifest for: []9 D/permissions_handler( 8970): No permissions found in manifest for: []9 E/Parcel ( 8970): Reading a NULL string not supported here. E/ion ( 8970): ioctl c0044901 failed with code -1: Invalid argument D/ProfileInstaller( 8970): Installing profile for com.ultralytics.ultralytics_yolo_example V/PhoneWindow( 8970): DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@3905c4e, this = DecorView@2eb416f[MainActivity] I/GED ( 8970): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 15, oppidx_max 15, oppidx_min 0 I/GED ( 8970): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 15, oppidx_max 15, oppidx_min 0 V/PhoneWindow( 8970): DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@3905c4e, this = DecorView@2eb416f[MainActivity]

UltralyticsAssistant commented 2 weeks ago

👋 Hello @isabinimam, thank you for submitting a ultralytics/yolo-flutter-app 🚀 issue. This is an automated response to help streamline our issue resolution process. An Ultralytics engineer will also assist you soon.

To help us address your storage permission issue on Android 11 efficiently, please ensure you've provided the following information:

  1. For bug reports:
    • A clear and concise description of the bug you're facing
    • A minimum reproducible example (MRE) that demonstrates the issue—please refer to our MRE documentation for guidance
    • Your environment details, including OS, Flutter SDK version, and relevant package versions
    • Expected behavior vs. actual behavior you're experiencing
    • Specific error messages or logs related to the issue, like the ones you included. More logs are welcome if they reveal further insights.

Additionally, ensure that:

Please check existing issues to avoid duplicates. If you have any more details or attachments to add, feel free to comment on this issue.

Thank you for your contribution to improving the yolo-flutter-app project! 🌟

isabinimam commented 2 weeks ago

when i running example code for object detection on android 11. yolo-flutter-app/example. the app's only asking for camera permission. there's no asking storage permission. When i give storage permission manually the error still insist. "Error requesting permissions". I've tried using storage permission command for android 11 only in AndroidManifest.xml, like: <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> but the problem still insist

Environtment: OS: Android 11, OPPO ColorOS V11.1 Flutter Version : Flutter 3.24.3 path: ^1.9.0 path_provider: ^2.1.4 permission_handler: ^11.3.1

Behavior: What expected: Ask permission for Camera and Storage What actuak: Ask permission only for Camera and when i give storage permission manually the error still insist.

Run Log: Launching lib\main.dart on CPH1911 in debug mode... Running Gradle task 'assembleDebug'... √ Built build\app\outputs\flutter-apk\app-debug.apk Installing build\app\outputs\flutter-apk\app-debug.apk... Debug service listening on ws://127.0.0.1:55805/ICxcpbQrjqQ=/ws Syncing files to device CPH1911... I/cs_yolo_exampl( 8970): Compiler allocated 4649KB to compile void android.view.ViewRootImpl.performTraversals() D/permissions_handler( 8970): No permissions found in manifest for: []9 D/permissions_handler( 8970): No permissions found in manifest for: []9 E/Parcel ( 8970): Reading a NULL string not supported here. E/ion ( 8970): ioctl c0044901 failed with code -1: Invalid argument D/ProfileInstaller( 8970): Installing profile for com.ultralytics.ultralytics_yolo_example V/PhoneWindow( 8970): DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@3905c4e, this = DecorView@2eb416f[MainActivity] I/GED ( 8970): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 15, oppidx_max 15, oppidx_min 0 I/GED ( 8970): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 15, oppidx_max 15, oppidx_min 0 V/PhoneWindow( 8970): DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@3905c4e, this = DecorView@2eb416f[MainActivity]

pderrenger commented 2 weeks ago

Please ensure you're using the latest version of the permission_handler package, as updates may resolve this issue. Additionally, verify that runtime permissions are requested programmatically in your code, as Android 11 requires explicit permission requests at runtime.