plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[@nativescript/localNotifications] - Android LocalNotifications.hasPermission() returns false after accepting notifications with firebase messaging

Open joaomsg11 opened this issue 4 months ago • 1 comments

Info

"@nativescript/local-notifications": "^6.4.0", "@nativescript/android": "8.9.1", "@nativescript/firebase-messaging": "5.0.2",

Problem

Both LocalNotifications.hasPermission() and LocalNotifications.requestPermissions() return false in a application with already given permissions for push notifications. This does not allow for usage of the LocalNotifications.schedule with error This piece of code const authStatus = await firebase() .messaging() .requestPermission(<any>{}); console.log('Android - checking notification permissions ...', authStatus); const aceptedLocalNotifications = await LocalNotifications.hasPermission(); console.log('Android - LocalNotifications.requestPermission', aceptedLocalNotifications);

returns Android - checking notification permissions ... 0 Android - LocalNotifications.requestPermission false

Error

Error in LocalNotifications.requestPermission: Error: Permission not granted

joaomsg11 avatar Aug 29 '25 12:08 joaomsg11

I believe this happens to me as well, after requesting permission using @nativescript-community/perms

guillemc23 avatar Oct 22 '25 22:10 guillemc23