Notifications (VIII)
Get the SENDER_ID
Go to https://console.developers.google.com
1) Look for Utilities and more
close to the user profile.
2) Go to Project Information
.
3) Copy the numeric value (not the string) of the Project Number
field.
Create the sending key
Go to https://console.developers.google.com
1) Go to API Google Cloud Messaging
-> Activate
2) Create credentials
Select 'Web server'
Name: <Proyecto>-GCM
IP:
Create
3) Copy the key
Installation
_$: cordova plugin add phonegap-plugin-push --variable SENDER_ID=<Project ID>
Note: This plugin does not work with phonegap serve
so you must create an apk application and install it on your smartphone after every change. Or use an emulator.
Include the plugin
.../phonegap/config.xml:
------------------------
...
<!-- Plugins -->
<plugin name="cordova-plugin-whitelist" version="1" />
<plugin name="cordova-plugin-inappbrowser" version="1" />
<plugin name="phonegap-plugin-push" />
...