How to check messaging permission status? #7174
Answered
by
SimonVillage
SimonVillage
asked this question in
Q&A
-
Is there a way to check the current permission status without requesting the permission? |
Beta Was this translation helpful? Give feedback.
Answered by
SimonVillage
Oct 12, 2021
Replies: 1 comment
-
Seems like this is working: static Future<bool> pushPermissionGranted() async {
FirebaseMessaging messaging = FirebaseMessaging.instance;
final settings = await messaging.getNotificationSettings();
return settings.authorizationStatus == AuthorizationStatus.authorized;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SimonVillage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems like this is working: