BIS Tech
BIS Tech

Reputation: 19434

how to fix this issue when handling permission using permission_handler plugin?

I handled permission when app started. like this:

  final PermissionHandler _permissionHandler = PermissionHandler();

  Future<Map<PermissionGroup, PermissionStatus>> permissions() async {
    Map<PermissionGroup, PermissionStatus> result =
        await _permissionHandler.requestPermissions([
          PermissionGroup.storage,
          PermissionGroup.camera,
        ]);
    return result;
  }

I used multi_image_picker official plugin

this plugin document said enables below permissions, I didn't add these plugin on android manifest. because I need to used handler_permission plugin.

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />

This error is coming when tap button.

Please enable access to the storage and the camera.

Upvotes: 0

Views: 1151

Answers (1)

chunhunghan
chunhunghan

Reputation: 54367

From permission handler's description
https://github.com/Baseflow/flutter-permission-handler#android-and-ios-specific-permissions
For this plugin to work you will have to add permission configuration to your AndroidManifest.xml (Android)

you still need to add these permission to android manifest

Upvotes: 1

Related Questions