fix: Request notification permission on android

This commit is contained in:
Krille 2024-02-04 08:02:02 +01:00
commit 6cc2c6a578
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
2 changed files with 7 additions and 0 deletions

View file

@ -139,6 +139,11 @@ class BackgroundPush {
}) async {
if (PlatformInfos.isIOS) {
await firebase?.requestPermission();
} else if (PlatformInfos.isAndroid) {
_flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>()
?.requestNotificationsPermission();
}
final clientName = PlatformInfos.clientName;
oldTokens ??= <String>{};