I am trying to ask user to grant permissions by Notification.requestPermission()
, but it seems to work only in desktop browser.
In Android Chrome the prompt does not show up, but if I do alert(Notification.permission)
then it alerts denied.
What else can I do?
You might have blocked the notifications
in your mobile browser unknowingly
Activate
them again
Go to
Chrome => Settings => Advanced => Site Settings => Notifications and check Ask first
Allow or block notifications from some sites:
Ps: It was an issue with his service worker registration. Anyway this answer can be helpful to any other user.