My confusion lies in understanding the process at hand.
For those unfamiliar, PhoneGap (or its open source counterpart Cordova) serves as an application that essentially packages your website to function like a real app. When the app is inactive, the website remains so as well. Therefore, if you wish to receive notifications, this functionality cannot be achieved solely through the website.
Instead, PhoneGap can facilitate communication with the underlying Operating System (such as iOS or Android) to enable notification registration. This can be accomplished by either creating a custom plugin within PhoneGap or utilizing existing ones like phonegap-plugin-push.
The aforementioned plugin typically involves three main steps:
1) Initialization - Setting up for different Operating Systems
var push = PushNotification.init({
"android": {"senderID": "12345679"},
"ios": {"alert": "true", "badge": "true", "sound": "true"},
"windows": {}
});
2) Registration - Identifying when notifications are triggered
push.on('registration', function(data) {
// data.registrationId
});
3) Action - Defining response actions
push.on('notification', function(data) {
// data.message,
// data.title,
// data.count,
// data.sound,
// data.image,
// data.additionalData
});