File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,9 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
78
78
hasPermission ( ) : Promise < boolean > {
79
79
return new Promise ( ( resolve , reject ) => {
80
80
try {
81
- // nothing to do on this platform
82
- resolve ( true ) ;
81
+ const context = utils . ad . getApplicationContext ( ) ;
82
+ const hasPermission = NotificationManagerCompatPackageName . NotificationManagerCompat . from ( context ) . areNotificationsEnabled ( ) ;
83
+ resolve ( hasPermission ) ;
83
84
} catch ( ex ) {
84
85
console . log ( "Error in LocalNotifications.hasPermission: " + ex ) ;
85
86
reject ( ex ) ;
@@ -244,4 +245,4 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
244
245
}
245
246
}
246
247
247
- export const LocalNotifications = new LocalNotificationsImpl ( ) ;
248
+ export const LocalNotifications = new LocalNotificationsImpl ( ) ;
You can’t perform that action at this time.
0 commit comments