Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I customize a permission request popup for push notifications in a browser?

I see that some websites have a fancy push notification permission request popups like this one

enter image description here

whereas official API documentation doesn't provide any clue how to customize permission requests; and the only request I can generate looks like that

enter image description here

How can I create a less ugly popup?

like image 841
mkvakin Avatar asked Oct 20 '17 02:10

mkvakin


People also ask

Can you personalize push notifications?

To add an extra layer of personalization to an iOS or Android push campaign message, you can use geo-location based push notifications. There are two ways brands can send push notifications based on a user's location: Location-based notifications: App users receive these pushes based on data collected on the backend.

Can you have a custom dialog message when asking for notification permissions?

In XCode, you can now click your App name on the left to open it's settings, click on Info, then add a new key called "Privacy - User Notifications Usage Description" -> Then you can set the value to whatever you want that message to say.


1 Answers

Click the Allow button on the House of Bots site and you'll see exactly how they do it--they don't.

The pop-up you see is just plain html, nothing special. When you click allow, it opens a new window that asks for permission, and then you get the typical browser window just like in your second image.

like image 125
Samuel Neff Avatar answered Sep 20 '22 17:09

Samuel Neff