-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Android permissions optional #1687
Comments
Thanks for raising this. Actually, the setting up of permissions use to be something the plugin required each app to do. This did lead to occurrences where issues would be raised as some of the community missed this step. Moreover, this change was driven by a review from the Flutter ecosystem committee when they were evaluating the plugin for the Flutter favourites program and mentioned this would reduce friction in using the plugin. I could look at moving these out so the plugin itself isn't requesting permissions besides the bare minimum but to be safe, will check with the committee if they have concerns on this happening |
FYI as a workaround, permissions merged from the plugin's AndroidManifest.xml can be removed in app's own AndroidManifest.xml like this: <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" tools:node="remove"/> |
This will help https://www.youtube.com/watch?v=aQTvI8L-mZs |
As a note, you must include the tools namespace in the manifest tag for that to work:
|
This has been done as part of the 16.0.0 prerelease |
Right now the plugin requires the app to have a bunch of permissions:
flutter_local_notifications/flutter_local_notifications/android/src/main/AndroidManifest.xml
Lines 3 to 7 in d3553c5
There is no way for applications to remove these permissions, even if they do not use features that require them. For instance, an app which only posts regular notifications does not need
RECEIVE_BOOT_COMPLETED
,USE_FULL_SCREEN_INTENT
, norSCHEDULE_EXACT_ALARM
.Other plugins (e.g.
flutter_background
, or even Flutter itself with theINTERNET
permission) ask developers to manually add the permissions they need in their docs.Would it be possible to do the same here, so that developers can remove permissions they don't need when using the plugin?
The text was updated successfully, but these errors were encountered: