c# - Notification Failed (Registration Invalid) on an Android Push -


i have succeeded sending push message ios device i'm running problem android. have been given gcm api key , registration id of device has app installed.

however, when try send push message, notificationfailed event triggered. exception of type pushsharp.android.gcmmessagetransportresponse , message "invalid registration". doing wrong?

var push = new pushbroker(); push.onnotificationsent += notificationsent; push.onchannelexception += channelexception; push.onserviceexception += serviceexception; push.onnotificationfailed += notificationfailed; push.ondevicesubscriptionexpired += devicesubscriptionexpired; push.ondevicesubscriptionchanged += devicesubscriptionchanged; push.onchannelcreated += channelcreated; push.onchanneldestroyed += channeldestroyed;  push.registergcmservice(new gcmpushchannelsettings("aixxxxxxxxxxxxxxxx")); push.queuenotification(new gcmnotification()              .fordeviceregistrationid("apaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") .withjson("{\"alert\":\"hello world!\",\"badge\":7,\"sound\":\"sound.caf\"}"); push.stopallservices(); 

push notification android require google api key, found google apis console, assume have.

most device registration id incorrect. try following these instructions: how configure , send gcm push notification


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -