vendredi 30 janvier 2015

Cordova PushPlugin onNotification ecb not fired


Vote count:

0





myApp.services.factory('GCMHelper', ($q)->

pushNotification = {}

_init = ()->
defer = $q.defer()

ionic.Platform.ready(()->
pushNotification = window.plugins.pushNotification;
window.onNotification = (res)->
console.log('onNotification', res)
defer.resolve()
)

return defer.promise

return {
register: ()->
_init().then(()->
pushNotification.register(
(res)->
console.log('gcm register success', res)
(err)->
console.log('gcm register err', err)
{
"senderID": "*********",
"ecb": "onNotification"
}
);
)
}
)


in controller:



GCMHelper.register()


(Please excuse my poor English) I'm tring Cordova PushPlugin with Cordova 4.2 and Ionic beta 14, it got success callback every time with "OK" string, but ecb onNotification never fired, and no error at console. I almost have no ideal with that..., any one help?



asked 2 mins ago







Cordova PushPlugin onNotification ecb not fired

Aucun commentaire:

Enregistrer un commentaire