I've set up the push notification plugin and am calling the register method, but it's only returning a string "OK" instead of a device id. How do I get the registered device id?
$window.plugins.pushNotification.register(
function (result) {
q.resolve(result); //this always just returns the string "OK", how do I get the device ID?
},
function (error) {
console.log(error);
q.reject(error);
},
config);
return q.promise;
},
e.regid is null, taken from this example
// Android and Amazon Fire OS
function onNotification(e) {
$("#app-status-ul").append('<li>EVENT -> RECEIVED:' + e.event + '</li>');
switch( e.event )
{
case 'registered':
if ( e.regid.length > 0 )
{
$("#app-status-ul").append('<li>REGISTERED -> REGID:' + e.regid + "</li>");
// Your GCM push server needs to know the regID before it can push to this device
// here is where you might want to send it the regID for later use.
console.log("regID = " + e.regid);
}
break;
case 'message':
// if this flag is set, this noti