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
7878 hasPermission ( ) : Promise < boolean > {
7979 return new Promise ( ( resolve , reject ) => {
8080 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 ) ;
8384 } catch ( ex ) {
8485 console . log ( "Error in LocalNotifications.hasPermission: " + ex ) ;
8586 reject ( ex ) ;
@@ -244,4 +245,4 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
244245 }
245246}
246247
247- export const LocalNotifications = new LocalNotificationsImpl ( ) ;
248+ export const LocalNotifications = new LocalNotificationsImpl ( ) ;
You can’t perform that action at this time.
0 commit comments