我没有收到我的 Android 推送通知。我能够
- 注册设备
- 接收设备标识符
- 将通知消息推送到 GCM
我成功进入通知发送事件,但我的设备上没有收到任何消息。成功推送代码如下:
string apiKey = "API KEY HERE";
push.RegisterGcmService(new GcmPushChannelSettings(apiKey));
string load = "Hello World";
int count = 2;
string dev = 'device identifier generated for device';
string payload = "{\"alert\":" + "\"" + load + "\"" + ",\"badge\":" + "\"" + count + "\"}";
//IMPORTANT: For Android you MUST use your own RegistrationId here that gets generated within your Android app itself!
GcmNotification note = new GcmNotification().ForDeviceRegistrationId(dev).WithJson(payload);