Worklight 推送通知示例

Worklight Push Notification Example

我正在尝试为 IBM 提供的混合应用程序实施推送通知示例,但出现以下注册错误。 GCM API KEY 和 PROJECT ID 已在应用程序中正确设置-descriptor.XML.

我在我的 Nexus 5 (Android 4.2.2) 中部署了使用分发证书签名的 APK,但它还没有工作。

有没有人可以帮助我?我正在使用 Worklight Studio 6.2

谢谢。

GCMRegistrar(29967): resetting backoff for com.PushNotifications GCMRegistrar(29967): Registering app com.PushNotifications of senders testpushgcmproject GCM(1431): GCM config loaded GCMBroadcastReceiver(29967): onReceive: com.google.android.c2dm.intent.REGISTRATION GCMBroadcastReceiver(29967): GCM IntentService class: com.PushNotifications.GCMIntentService GCMBaseIntentService(29967): Acquiring wakelock GCMBaseIntentService(29967): Intent service name: GCMIntentService-DynamicSenderIds-2 GCMBaseIntentService(29967): handleRegistration: registrationId = null, error = INVALID_SENDER, unregistered = null GCMBaseIntentService(29967): Registration error: INVALID_SENDER GCMBaseIntentService(29967): Releasing wakelock

SENDER_ID = 项目编号,可能是您使用了错误的 SENDER_ID 例如项目 ID.. 项目编号在项目 ID 旁边的控制台上可用。

您需要使用项目编号。您可以在访问您的 GCM 后看到它 "project":