2
我没有收到我的Android推送通知。我能够在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);
似乎有一些需要在Android应用程序方面做是为了一旦GCM收到以显示他们手机上。我发现这些消息被推送到GCM和GCM发送给他们,但android应用程序没有处理要显示的消息。感谢您的帮助。 – user1453999