Skip to content

Commit

Permalink
TW-726 Notification android
Browse files Browse the repository at this point in the history
  • Loading branch information
drminh2807 authored and hoangdat committed Oct 5, 2023
1 parent b052f2a commit 4b434e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/utils/background_push.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ class BackgroundPush {
if (PlatformInfos.isIOS) {
// Request iOS permission before getting the token
await fcmSharedIsolate?.requestPermission();
} else if (Platform.isAndroid) {
await _flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>()
?.requestPermission();
}
_pushToken = await (Platform.isIOS
? apnChannel.invokeMethod("getToken")
Expand Down

0 comments on commit 4b434e5

Please sign in to comment.