3

I am about to implement ionic-native Push Notifications. Will this work in a browser, or do I need to install a iOS/Android Emulator?

4

1 回答 1

0

It won't work on Browsers unless you use the Phonegap Push Server. Please refer to the Phonegap Push Plugin documentation.

Browser details

Browser quirks

For the time being push support on the browser will only work using the PhoneGap push server.

When you run phonegap serve to test browser push point your browser at http://localhost:3000. The browser push implementation uses the W3C Push Spec's implementation which relies on ServiceWorkers and ServiceWorkers can only be accessed via the https protocol or via http://localhost. Pointing your browser at localhost will be the easiest way to test.

Browser Support

Chrome 49+ Firefox 46+

NB: In order to make it work in an Android emulator, a special configuration is required. I recommend using a real device, if you can. Plus, the iOS simulator is not able (not at all) to simulate push notifications. In that case, you must use a real device.

于 2017-02-21T14:23:05.200 回答