Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PWA - requesting permission not working on Android Chrome

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?

like image 582
Jakub Kosior Avatar asked Oct 15 '25 20:10

Jakub Kosior


1 Answers

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:

  1. On your Android phone or tablet, open the Chrome app Chrome.
  2. To the right of the address bar, tap More More and then Info Information.
  3. Tap Site Settings and then Notifications.
  4. If you don’t see the setting here, this website can’t send you notifications.
  5. Choose Allow or Ask first.

Here is the reference

Ps: It was an issue with his service worker registration. Anyway this answer can be helpful to any other user.

like image 65
Sravan Avatar answered Oct 17 '25 09:10

Sravan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!