Baseflow / flutter-permission-handler

Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
https://baseflow.com
MIT License
2.06k stars 865 forks source link

PackageManager has been deprecated #851

Closed pradeep14598 closed 2 years ago

pradeep14598 commented 2 years ago

/Users/user/.pub-cache/hosted/pub.dartlang.org/permission_handler_android-9.0.2+1/android/src/main/java/com/baseflow/permissionhandler/PermissionUtils.java:318: warning: [deprecation] getPackageInfo(String,int) in PackageManager has been deprecated .getPackageInfo(context.getPackageName(), PackageManager.GET_PERMISSIONS);

alex-sandri commented 2 years ago

@pradeep14598 I updated this as part of the migration to support Android 13's POST_NOTIFICATIONS permission in #845.

mvanbeusekom commented 2 years ago

This should be fixed as part of version 10.0.0 of the permission_handler plugin.

Warning this version contains a breaking change and requires you to update the compileSdkVersion to 33 in the android/app/build.gradle file. This means you should also download and install this SDK using Android Studios SDK Manager.

tashiwangdi commented 2 years ago

@mvanbeusekom While this fixes the issue in android, the issue with iOS - https://github.com/Baseflow/flutter-permission-handler/issues/860 makes version ^10.0.0 of plugin unusable 😞 in the sense that camera permission is asked every time camera is needed even if the permission has already been granted.

tashiwangdi commented 2 years ago

@mvanbeusekom While this fixes the issue in android, the issue with iOS - #860 makes version ^10.0.0 of plugin unusable 😞 in the sense that camera permission is asked every time camera is needed even if the permission has already been granted.

I got around the issue with the following : https://github.com/Baseflow/flutter-permission-handler/issues/860#issuecomment-1173520284

govindaeologic commented 2 years ago

in my case by upgrading the permission handler to latest version resolved my problem

Sarat-1997 commented 1 year ago

This should be fixed as part of version 10.0.0 of the permission_handler plugin.

Warning this version contains a breaking change and requires you to update the compileSdkVersion to 33 in the android/app/build.gradle file. This means you should also download and install this SDK using Android Studios SDK Manager.

Thanks @mvanbeusekom. It works!!!!

yogithesymbian commented 1 year ago
  • and t

how about if my min dart sdk is 2.12 not 2.15