MOBILE-4215 android: Request notification permission on start
parent
9a72ca307a
commit
781a950853
|
@ -71,9 +71,8 @@ export class CoreLocalNotificationsProvider {
|
||||||
async initialize(): Promise<void> {
|
async initialize(): Promise<void> {
|
||||||
await CorePlatform.ready();
|
await CorePlatform.ready();
|
||||||
|
|
||||||
if (!this.isAvailable()) {
|
// Request permission when the app starts.
|
||||||
return;
|
LocalNotifications.requestPermission();
|
||||||
}
|
|
||||||
|
|
||||||
// Listen to events.
|
// Listen to events.
|
||||||
this.triggerSubscription = LocalNotifications.on('trigger').subscribe((notification: ILocalNotification) => {
|
this.triggerSubscription = LocalNotifications.on('trigger').subscribe((notification: ILocalNotification) => {
|
||||||
|
|
Loading…
Reference in New Issue