swiftmobileuiwebviewpush

How to play notification sound in mobile website


I have a WebView mobile application. So I use a website embbeded in this application.
I'm searching a way to play sound notifications in mobile website when the device screen is in locked mode. How can I do this ?

I heard that this is called as Specific Push or Web Push but I couldn't find a code for this in anywhere.

Update 1
I'm trying with Swift and Xamarin.

Update 2
I learned from here that currently Web Push is not supported by Apple.


Solution

  • To send push notifications you can use something like onesignal.com or create your own push server. If you use Phonegap you can send local notification, but it will only work if your app is running while phone is in sleep mode.