IBM工作灯 - 发送推送通知到Android没有到达 [英] IBM Worklight - Sent push notification to Android are not arriving

查看:490
本文介绍了IBM工作灯 - 发送推送通知到Android没有到达的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载从推送通知项目Woklight入门,我已经在我的设备使用正确的API密钥和senderId安装。我已经部署了适配器和它的正常工作。
现在我要做的发送推送通知到设备的测试。

I've downloaded the push notifications project from "Woklight getting started" and I've installed it in my device with the proper API key and senderId. I've deployed the adapter and it's working fine. Now I'm trying to do the test of sending push notifications to the device.

要登录该应用程序,我可以使用任意值,对吗?
像用户名=圣诞老人和密码=奶酪。

To log in the application I can use arbitrary values, am I right? Like Username="Santaclaus" and Password="cheese".

然后调用右键单击该适配器>调用程序>指定的用户名和邮件转接过程中,在用户名我都会把圣诞老人,并在消息BLABLA BLA BLA,我是正确的?

Then to invoke the adapter procedure by right-clicking the adapter > invoke procedure > specify username and message, in the username I will put "Santaclaus" and in the message "Blabla bla bla", am I correct?

问题是,当我preSS的运行按钮,程序的调用结果:从工作灯服务器submitNotification

The problem is that when I press the Run button, the Invocation Result of procedure: 'submitNotification' from the Worklight Server:

    {
   "isSuccessful": true,
   "result": "Notification sent to user :: Santaclaus"
}

和控制台显示此错误:

[AUDIT   ] CWWKG0016I: Starting server configuration update.
[AUDIT   ] CWWKG0017I: The server configuration was successfully updated in 0.010 seconds.
[AUDIT   ] CWWKT0017I: Web application removed (default_host): http://L3CDH3K.corp.capgemini.com:10080/PushNotifications/
[AUDIT   ] CWWKZ0009I: The application PushNotifications has stopped successfully.
[AUDIT   ] CWWKG0016I: Starting server configuration update.
[AUDIT   ] CWWKG0017I: The server configuration was successfully updated in 0.030 seconds.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://L3CDH3K.corp.capgemini.com:10080/PushNotifications/
[AUDIT   ] CWWKZ0001I: Application PushNotifications started in 3.362 seconds.
[WARNING ] FWLSE0029W: Registration of application PushNotifications-android-1.0 to mediator occured more than once. [project PushNotifications]
[WARNING ] FWLSE0029W: Registration of application PushNotifications-android-1.0 to mediator occured more than once. [project PushNotifications]
[ERROR   ] FWLSE0094E: Error while attempting to invoke GCM service (for sender key starting with 'AIzaSyBb'), sending will not resume until server is restarted or application re-deployed [project PushNotifications]
[ERROR   ] FWLSE0093E: Failed to invoke Google GCM push service. [project PushNotifications]
GCM Service invocation failed (reason: Authentication has failed for sender key starting with 'AIzaSyBb')
[WARNING ] Authentication error: Unable to respond to any of these challenges: {}

和LogCat中显示:

and the LogCat shows:

01-02 10:15:27.873: D/PushNotifications(7609): wlclient init started
01-02 10:15:27.883: D/PushNotifications(7609): Read cookies: null
01-02 10:15:27.883: D/PushNotifications(7609): CookieMgr read cookies: {}
01-02 10:15:27.933: W/PushNotifications(7609): Your application is using the WL.OptionsMenu API. Note that, if your application targets Android 3.0 (API level 11) or higher, WL.OptionsMenu might have no effect, depending on the device.
01-02 10:15:27.943: D/PushNotifications(7609): addDeviceIDHeader deviceIDSuccessCallback
01-02 10:15:27.963: D/PushNotifications(7609): connectOnStartup
01-02 10:15:27.973: D/PushNotifications(7609): connectOnStartup isCertificateExists:  false
01-02 10:15:28.473: D/PushNotifications(7609): Request [http://192.168.16.128:10080/PushNotifications/apps/services/api/PushNotifications/android/init]
01-02 10:15:28.563: D/CordovaActivity(7609): onMessage(spinner,stop)
01-02 10:15:30.983: D/SoftKeyboardDetect(7609): Ignore this event
01-02 10:15:31.083: D/dalvikvm(692): GC_CONCURRENT freed 448K, 8% free 8302K/8968K, paused 3ms+9ms, total 54ms
01-02 10:15:31.113: D/SoftKeyboardDetect(7609): Ignore this event
01-02 10:15:32.803: D/dalvikvm(490): GC_CONCURRENT freed 1668K, 18% free 15196K/18376K, paused 2ms+10ms, total 91ms
01-02 10:15:32.883: D/dalvikvm(692): GC_CONCURRENT freed 409K, 8% free 8280K/8968K, paused 3ms+3ms, total 29ms
01-02 10:15:37.473: D/dalvikvm(7544): GC_CONCURRENT freed 150K, 4% free 8393K/8700K, paused 3ms+2ms, total 22ms
01-02 10:15:37.513: D/Finsky(7544): [1] 5.onFinished: Installation state replication succeeded.
01-02 10:15:38.883: D/SoftKeyboardDetect(7609): Ignore this event
01-02 10:15:38.923: W/IInputConnectionWrapper(7609): getTextBeforeCursor on inactive InputConnection
01-02 10:15:38.923: W/IInputConnectionWrapper(7609): getTextAfterCursor on inactive InputConnection
01-02 10:15:39.003: D/SoftKeyboardDetect(7609): Ignore this event
01-02 10:15:40.023: I/GetJar SDK [com.zeptolab.ctr.ads](2538): CommManager checkManifestFile started
01-02 10:15:40.023: W/GetJar SDK [com.zeptolab.ctr.ads](2538): [OPTIONAL] Could not find the com.getjar.sdk.rewards.GetJarReceiver defined inside AndroidManifest.xml. It is required if there is no other implementation of Google Play billing.
01-02 10:15:40.053: I/GetJar SDK [com.zeptolab.ctr.ads](2538): AuthFlow: ensureAuthInternal() state:STARTING
01-02 10:15:40.053: I/GetJar SDK [com.zeptolab.ctr.ads](2538): AuthFlow: ensureAuthInternal() [running auth-flow]
01-02 10:15:40.053: I/GetJar SDK [com.zeptolab.ctr.ads](2538): AuthFlow: ensureAuthInternal() finishing with state:EXPIRY_CHECKING
01-02 10:15:40.133: D/dalvikvm(2538): GC_CONCURRENT freed 5953K, 20% free 25539K/31648K, paused 4ms+4ms, total 72ms
01-02 10:15:40.133: D/dalvikvm(2538): WAIT_FOR_CONCURRENT_GC blocked 39ms
01-02 10:15:44.163: D/PushNotifications(7609): Request [login]
01-02 10:15:44.243: D/SoftKeyboardDetect(7609): Ignore this event
01-02 10:15:44.373: D/PushNotifications(7609): Request [http://192.168.16.128:10080/PushNotifications/apps/services/api/PushNotifications/android/init]
01-02 10:15:48.043: D/dalvikvm(7609): GC_CONCURRENT freed 336K, 7% free 8328K/8864K, paused 2ms+2ms, total 32ms
01-02 10:15:49.433: D/PushNotifications(7609): Request [http://192.168.16.128:10080/PushNotifications/apps/services/api/PushNotifications/android/init]
01-02 10:15:49.463: W/InputMethodManagerService(490): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4186d4c0 attribute=null, token = android.os.BinderProxy@41af16b8
01-02 10:15:49.723: D/PushNotifications(7609): Clearing notification subscriptions.
01-02 10:15:49.723: D/PushNotifications(7609): Updating notification subscriptions.
01-02 10:15:49.723: D/WLDroidGap(7609): unregisterReceivers:Receiver not registered: null
01-02 10:15:49.723: D/WLDroidGap(7609): unregisterReceivers:Receiver not registered: null
01-02 10:15:49.733: V/GCMRegistrar(7609): Registering receiver
01-02 10:15:49.733: D/GCMRegistrar(7609): resetting backoff for com.PushNotifications
01-02 10:15:49.753: V/GCMRegistrar(7609): Registering app com.PushNotifications of senders 515493207294
01-02 10:15:49.753: W/PluginManager(7609): THREAD WARNING: exec() call to Push.subscribe blocked the main thread for 24ms. Plugin should use CordovaInterface.getThreadPool().
01-02 10:15:49.763: D/PushNotifications(7609): response [http://192.168.16.128:10080/PushNotifications/apps/services/api/PushNotifications/android/init] success: /*-secure-
01-02 10:15:49.763: D/PushNotifications(7609): {"WL-Authentication-Success":{"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"PushAppRealm":{"userId":"Santaclaus","attributes":{},"isUserAuthenticated":1,"displayName":"Santaclaus"},"wl_antiXSRFRealm":{"userId":"35rkplsu96msjk6hichq990k2h","attributes":{},"isUserAuthenticated":1,"displayName":"35rkplsu96msjk6hichq990k2h"},"wl_deviceNoProvisioningRealm":{"userId":"05282bf4-9fe4-3c40-8280-3e627db3fe5c","attributes":{"mobileClientData":"com.worklight.core.auth.ext.MobileClientData@eb49d"},"isUserAuthenticated":1,"displayName":"05282bf4-9fe4-3c40-8280-3e627db3fe5c"}},"userPrefs":{},"notificationSubscriptionState":{"eventSources":[{"eventSource":"PushEventSource","alias":"myPush","adapter":"PushAdapter"}],"token":"APA91bFg1hMAQcCZnLHRQ5qIZu5HdkcWpt0p99cftqXD4YrrxD8W-F5r7x3DYRGv-hY0jFTvtg5Yg9Uo1o_EjJFxkoyLUKGxNiRzmh-md9-FwCQ2gfSvTVFT1Vt6J9UigpwdWFCblB-dBBYv4U9Z2S3Vi5gvBFr9WPUwDQGR2Ez5GfQQiYj3x1k"},"gadgetProps":{"directUpdate":{"updateUnpackedSize":1187754,"availableSkins":["default"],"checksum":796238133,"updateSize":385169},"ENVIRONMENT":"android"},"userInfo":{"wl_authenticityRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"PushAppRealm":{"userId":"Santaclaus","attributes":{},"isUserAuthenticated":1,"displayName":"Santaclaus"},"wl_antiXSRFRealm":{"userId":"35rkplsu96msjk6hichq990k2h","attributes":{},"isUserAuthenticated":1,"displayName":"35rkplsu96msjk6hichq990k2h"},"wl_deviceAutoProvisioningRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceNoProvisioningRealm":{"userId":"05282bf4-9fe4-3c40-8280-3e627db3fe5c","attributes":{"mobileClientData":"com.worklight.core.auth.ext.MobileClientData@eb49d"},"isUserAuthenticated":1,"displayName":"05282bf4-9fe4-3c40-8280-3e627db3fe5c"},"myserver":{"userId":"Santaclaus","attributes":{},"isUserAuthenticated":1,"displayName":"Santaclaus"},"wl_anonymousUserRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null}}}*/
01-02 10:15:49.763: D/PushNotifications(7609): wlclient connect success
01-02 10:15:49.773: D/PushNotifications(7609): before: app init onSuccess
01-02 10:15:49.783: D/PushNotifications(7609): after: app init onSuccess
01-02 10:15:49.783: D/PushNotifications(7609): added onPause event handler 
01-02 10:15:49.783: D/PushNotifications(7609): wlclient init success
01-02 10:15:49.913: D/dalvikvm(929): GC_CONCURRENT freed 408K, 8% free 8984K/9664K, paused 3ms+2ms, total 25ms
01-02 10:15:49.993: V/GCMBroadcastReceiver(7609): onReceive: com.google.android.c2dm.intent.REGISTRATION
01-02 10:15:49.993: V/GCMBroadcastReceiver(7609): GCM IntentService class: com.PushNotifications.GCMIntentService
01-02 10:15:49.993: V/GCMBaseIntentService(7609): Acquiring wakelock
01-02 10:15:50.003: V/GCMBaseIntentService(7609): Intent service name: GCMIntentService-515493207294-1
01-02 10:15:50.003: D/GCMBaseIntentService(7609): handleRegistration: registrationId = APA91bFg1hMAQcCZnLHRQ5qIZu5HdkcWpt0p99cftqXD4YrrxD8W-F5r7x3DYRGv-hY0jFTvtg5Yg9Uo1o_EjJFxkoyLUKGxNiRzmh-md9-FwCQ2gfSvTVFT1Vt6J9UigpwdWFCblB-dBBYv4U9Z2S3Vi5gvBFr9WPUwDQGR2Ez5GfQQiYj3x1k, error = null, unregistered = null
01-02 10:15:50.003: D/GCMRegistrar(7609): resetting backoff for com.PushNotifications
01-02 10:15:50.003: V/GCMRegistrar(7609): Saving regId on app version 1
01-02 10:15:50.023: D/WLDroidGap(7609): WLGCMIntentService: Registered at the GCM server with registration id APA91bFg1hMAQcCZnLHRQ5qIZu5HdkcWpt0p99cftqXD4YrrxD8W-F5r7x3DYRGv-hY0jFTvtg5Yg9Uo1o_EjJFxkoyLUKGxNiRzmh-md9-FwCQ2gfSvTVFT1Vt6J9UigpwdWFCblB-dBBYv4U9Z2S3Vi5gvBFr9WPUwDQGR2Ez5GfQQiYj3x1k
01-02 10:15:50.023: V/GCMBaseIntentService(7609): Releasing wakelock
01-02 10:15:50.943: W/InputMethodManagerService(490): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@419c5618 attribute=null, token = android.os.BinderProxy@41af16b8
01-02 10:15:52.613: D/PushNotifications(7609): Request [http://192.168.16.128:10080/PushNotifications/apps/services/api/PushNotifications/android/notifications]
01-02 10:15:52.623: D/WLDroidGap(7609): Push.dispatch(): method=WL.Client.Push.__onmessage
01-02 10:15:52.793: D/PushNotifications(7609): response [http://192.168.16.128:10080/PushNotifications/apps/services/api/PushNotifications/android/notifications] success: /*-secure-
01-02 10:15:52.793: D/PushNotifications(7609): {"errors":[],"isSuccessful":true,"warnings":[],"info":[]}*/
01-02 10:15:55.593: W/InputMethodManagerService(490): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41b721e8 attribute=null, token = android.os.BinderProxy@41af16b8

这是从应用descriptor.xml文件中的android元素:

This is the android element from application-descriptor.xml file:

 <android securityTest="PushApplication-strong-mobile-securityTest" version="1.0">
        <worklightSettings include="true"/>
        <pushSender key="AIzaSyBb08MeW5jlh9bDSlpqHsgGgknT6QHiWn4" senderId="515493207294"/>
        <security>
            <encryptWebResources enabled="false"/>
            <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
            <publicSigningKey>Replace this text with the actual public signing key of the certificate used to sign the APK, available by using the 'Extract public signing key' wizard.</publicSigningKey>
        </security>
 </android>

我创建了谷歌从云端控制台浏览器密钥。我创建排在首位的机器人钥匙,我不知道我使用的应该。在这种情况下,我使用的浏览器密钥的指定的参照网址如下:

I've created a browser key from Google Cloud Console. I've created an android key in first place, I don't know which should I use. In this case I used the browser key specifying the referers as follows:

0E:30:5F:3A:A0:D9:A5:41:EF:FB:08:1B:7A:AC:0B:92:E1:C7:E8:33;com.PushNotifications

该设备的操作系统版本的是Android 4.2.1
我使用可用的工作灯开发版的最后一个版本。
你有什么想法如何使它工作?

The device OS version is android 4.2.1 I'm using the last version available of Worklight Developer Edition. Have you any idea how to make it works?

感谢。

推荐答案

按照设置说明如下规定:<一href=\"http://stackoverflow.com/questions/20551069/ibm-worklight-5-0-6-1-android-notification-does-not-reach-either-device-or-emu\">IBM工作灯5.0.6.1 - Android的通知没有达到任何一台设备或模拟器

Follow the set-up instructions as provided here: IBM Worklight 5.0.6.1 - Android notification does not reach either device or emulator


  • 模拟器指令不是你的情况相关的

  • 在创建的浏览器键,简单地做创建新密钥&GT;浏览器Key与GT;创建

  • 不会修改它之后,即不要在添加任何东西接受请求......一节。在你的问题你提到你做到这一点 - 撤消

  • The emulator instructions are not relevant in your case
  • When creating the browser key, simply do Create New Key > Browser Key > Create.
  • Do not edit it afterwards, i.e. do not add anything in the "Accept requests..." section. In your question you mention that you do this - undo it.

这篇关于IBM工作灯 - 发送推送通知到Android没有到达的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆