【发布时间】:2015-10-17 08:25:56
【问题描述】:
我使用 GCM 将通知消息从我的服务器推送到 Android 和 iOS 设备。
目前我正在使用PushSharp 库,就是这样使用的:
string senderId = "my server id from google console";
string device_regId = "some device id";
//Create our push services broker
var push = new PushBroker();
//Registering the GCM Service and sending an Android Notification
push.RegisterGcmService(new GcmPushChannelSettings(senderId));
push.QueueNotification(new GcmNotification().ForDeviceRegistrationId(device_regId)
.WithJson("{\"message\":\"TestMessage!\",\"badge\":1}"));
我在谷歌上读过InsanceID Documentation,
问题:
1- 如何在服务器端使用它?
2- 我当前的实现会发生什么变化?
3- 是否有任何示例说明如何使用 InsanceID 而不是之前使用但现在已弃用的 RegisterationId?
【问题讨论】:
标签: c# android wcf google-cloud-messaging pushsharp