Skip to content

Commit

Permalink
Add: Token
Browse files Browse the repository at this point in the history
  • Loading branch information
happycastle114 committed Nov 10, 2024
1 parent 485d4cc commit 6e1af16
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,24 @@ void main() async {

FirebaseMessaging.onBackgroundMessage(handleMessage);

await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(
alert: false,
badge: false,
sound: false,
);

await Token().init();

await FirebaseMessaging.instance.requestPermission(
alert: true,
announcement: false,
badge: true,
carPlay: false,
criticalAlert: false,
provisional: true,
sound: true,
);

await RemoteConfigController().init();
await Future.wait([
FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(
alert: false,
badge: false,
sound: false,
),
Token().init(),
FirebaseMessaging.instance.requestPermission(
alert: true,
announcement: false,
badge: true,
carPlay: false,
criticalAlert: false,
provisional: true,
sound: true,
),
RemoteConfigController().init()
]);

runApp(MyHome());
}
Expand Down

0 comments on commit 6e1af16

Please sign in to comment.