Search code examples
cordovasocketsphonegap-pluginsionic-frameworkcordova-plugins

Cordova/PhoneGap Push Notification versus Using Socket Notifications


We are working on mobile app that we are using Cordova (Ionic specifically), and we are using PhoneGap PushPlugin and Amazon SNS for Push Notifications. This in turn hits one of our servers that talks with Amazon SNS and the corresponding notification servers (APN,GCM,etc) to push data to our mobile devices.

I am a bit confused at what the difference in the case of PhoneGap/Cordova, what is the advantage or reasoning for setting this up versus socket notifications (through socket.io for example).

Do push notifications reach a mobile device when the application is not running, If not, it would seem that the application would need to be running, which would mean that using sockets was more than sufficient.

Can you receive mobile push notifications in PhoneGap/Cordova while the application is not running?


Solution

  • Push notification will work even if you application is not running. Additionally you can configure your push messages to be delivered once the device comes back from powered off state too. You app can receive notifications, after loosing connectivity and then regaining it back. All the logic pertaining to storing message on APN/GCM server and reestablishing connectivity etc is built into these system.