From 781a950853cb1b089f8b01e56c64c37211937034 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 20 Apr 2023 15:15:29 +0200 Subject: [PATCH] MOBILE-4215 android: Request notification permission on start --- src/core/services/local-notifications.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/services/local-notifications.ts b/src/core/services/local-notifications.ts index d10df4c94..8992c01aa 100644 --- a/src/core/services/local-notifications.ts +++ b/src/core/services/local-notifications.ts @@ -71,9 +71,8 @@ export class CoreLocalNotificationsProvider { async initialize(): Promise { await CorePlatform.ready(); - if (!this.isAvailable()) { - return; - } + // Request permission when the app starts. + LocalNotifications.requestPermission(); // Listen to events. this.triggerSubscription = LocalNotifications.on('trigger').subscribe((notification: ILocalNotification) => {