Fisrt we need to install pushsharp from Nuget
push.RegisterGcmService(new GcmPushChannelSettings("AIzaSyDxFtc9lbt4Tlg4-o7RJ1o-mK2ld1fO85A"));
push.QueueNotification(new GcmNotification().ForDeviceRegistrationId("dExp3B0bKVg:APA91bH2K45atGUbjpywrpeT15P8WUkB3tBS2n4tbiA2sdUA63_Tsd9ZYqNboDlw2NFo1egM8_unej07TzldJYRItvqrTRlDWk2AxFNjGRWVP-KFviIi86K3OJv5aMHBFK3ANC4heIpe")
.WithJson(@"{""alert"":""Hello World!"",""badge"":10,""sound"":""sound.caf""}"));
//Stop and wait for the queues to drains before it dispose
push.StopAllServices();
push.RegisterGcmService(new GcmPushChannelSettings("AIzaSyDxFtc9lbt4Tlg4-o7RJ1o-mK2ld1fO85A"));
push.QueueNotification(new GcmNotification().ForDeviceRegistrationId("dExp3B0bKVg:APA91bH2K45atGUbjpywrpeT15P8WUkB3tBS2n4tbiA2sdUA63_Tsd9ZYqNboDlw2NFo1egM8_unej07TzldJYRItvqrTRlDWk2AxFNjGRWVP-KFviIi86K3OJv5aMHBFK3ANC4heIpe")
.WithJson(@"{""alert"":""Hello World!"",""badge"":10,""sound"":""sound.caf""}"));
//Stop and wait for the queues to drains before it dispose
push.StopAllServices();
No comments:
Post a Comment