App nicht geöffnet, wenn im Infobereich auf Nachricht geklickt wird

Ich entwickle eine Worklight-App, die mit Push-Benachrichtigungen funktioniert. Ich teste gerade auf Android und habe den Adapter, um eine Push-Benachrichtigung an die App zu senden. Das Problem ist: Die App empfängt sie nur, wenn sie sich im Vordergrund befindet. Es wird nicht empfangen, wenn es sich im Hintergrund befindet, und ich öffne es, nachdem eine Nachricht im Benachrichtigungsbereich angezeigt wurde. Die App wird auch nicht geöffnet, wenn ich auf die Nachricht im Infobereich klicke.

Ich habe das PushNotifications-Beispiel studiert und es scheint, als ob ich genau das Gleiche tue. Ich habe die Berechtigungen usw. in der Android-Manifest-Datei mit denen im Beispiel abgeglichen. Es scheint jedoch nicht zu funktionieren. Unten finden Sie einen Auszug aus dem Protokoll, wenn Sie das PushNotifications-Beispiel ausführen.

10-08 09:58:48.227: V/GCMBroadcastReceiver(2771): onReceive: com.google.android.c2dm.intent.RECEIVE
10-08 09:58:48.227: V/GCMBroadcastReceiver(2771): GCM IntentService class: com.PushNotifications.GCMIntentService
10-08 09:58:48.227: V/GCMBaseIntentService(2771): Acquiring wakelock
10-08 09:58:48.237: V/GCMBaseIntentService(2771): Intent service name: GCMIntentService-DynamicSenderIds-4
10-08 09:58:48.237: D/GCMIntentService(2771): GCMIntentService.onMessage in GCMIntentService.java:101 :: WLGCMIntentService: Received a message from the GCM server
10-08 09:58:48.237: W/GCMIntentService(2771): GCMIntentService.onMessage in GCMIntentService.java:108 :: Unable to update badge while received push notification, becasue failed to parse badge number null, badge must be an integer number.
10-08 09:58:48.257: V/GCMBaseIntentService(2771): Releasing wakelock
10-08 09:58:48.257: D/GCMIntentService(2771): GCMIntentService.addToIntentQueue in GCMIntentService.java:123 :: WLGCMIntentService: App is not on foreground. Queue the intent for later re-sending when app is back on foreground.
10-08 09:58:48.277: D/push(2771): Push$1.onReceive in Push.java:91 :: Push: Queuing message for dispatch to javascript
10-08 09:58:48.277: D/GCMIntentService(2771): GCMIntentService.onUnhandled in GCMIntentService.java:164 :: WLGCMIntentService: Showing notification for unhandled Message(alert=Hoi-hoi, badge=1, sound=null, payload={"alias":"myPush","custom":"data"})
10-08 09:59:20.837: D/Whitelist(2771): Unlimited access to network resources
10-08 09:59:20.837: I/CordovaLog(2771): Changing log level to DEBUG(3)
10-08 09:59:20.837: D/CordovaActivity(2771): Resuming the App
10-08 09:59:20.837: D/CordovaActivity(2771): CB-3064: The errorUrl is null
10-08 09:59:20.877: W/EGL_emulation(2771): eglSurfaceAttrib not implemented
10-08 09:59:20.907: D/dalvikvm(2771): GC_FOR_ALLOC freed 810K, 27% free 4785K/6516K, paused 25ms, total 25ms
10-08 09:59:20.917: D/push(2771): Push.dispatchPending in Push.java:390 :: Dispatching to javascript Message(alert=Hoi-hoi, badge=1, sound=null, payload={"alias":"myPush","custom":"data"})
10-08 09:59:20.917: D/WLClient(2771): WLClient$ActivityListener.onActivityStarted in WLClient.java:1180 :: on activity started com.PushNotifications.PushNotifications
10-08 09:59:20.917: D/WLClient(2771): WLClient$ActivityListener.onActivityResumed in WLClient.java:1169 :: on activity resumed com.PushNotifications.PushNotifications . activity count = 1

Meine ist fast gleich, außer dass die dritte Zeile von unten (D / push (2771): Push.dispatchPending) fehlt. Das Ereignis in der Warteschlange wird anscheinend nie an die App gesendet.

Was darf ich vermissen?

Worklight-Version ist 6.2.0.00-20140922-2259.

Antworten auf die Frage(1)

Ihre Antwort auf die Frage