小编par*_*ram的帖子

通过解析向单个设备发送推送通知

我可以在我的Android应用程序中向一个特定设备(可能带有设备ID?)而不是每个设备发送推送消息吗?
一个简单的"是的,那可能是解析"或"不,你不能使用解析"就足够了!如果ans是,那么我需要知道如何.....

android parse-platform

5
推荐指数
1
解决办法
4728
查看次数

注册到gcm时获取null设备ID

GCMRegistrar.checkDevice(this);
GCMRegistrar.unregister(this);  
GCMRegistrar.checkManifest(this);

if (GCMRegistrar.isRegistered(this)) {
    GCMRegistrar.getRegistrationId(this));
}

regId = GCMRegistrar.getRegistrationId(this);
l.setText(regId);

if (regId.equals("")) {     
    GCMRegistrar.register(this, "187805647345");
    GCMRegistrar.getRegistrationId(this));
    l.setText(regId);
}
else {
    GCMRegistrar.getRegistrationId(this));
}

Toast.makeText(RegisterHalf.this,""+regId,2000).show();
Run Code Online (Sandbox Code Playgroud)

当我运行应用程序时,我得到device id = null 但是当我第二次运行时device id 一个值.

请告诉我为什么会这样.

android google-cloud-messaging

1
推荐指数
1
解决办法
1469
查看次数