Skip to content

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

Open

Description

@joaomsg11

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

Activity

  1. changed the title [-][@nativescript/localNotifications] - LocalNotifications.hasPermission() returns false after accepting notifications with firebase messaging[/-] [+][@nativescript/localNotifications] - Android LocalNotifications.hasPermission() returns false after accepting notifications with firebase messaging[/+] on Sep 1, 2025
  2. guillemc23 commented on Oct 22, 2025

    @guillemc23
    Contributor

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

  3. tiagoeirinha commented on Feb 25, 2026

    @tiagoeirinha

    I solved this problem by downloading the package from the git repository and installing it from the local folder. I noticed that when I installed it from npmjs, the dependency "@nativescript-community/perms" was version 2.3.0 and in the repository they updated it to 3.0.4 commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions