I recently added GCM messaging to my app using Google's Assistant Groups (GCMBCRCCE, GCMBCIntent Service) . This app is running when it works beautifully, both when it is in the foreground and when it is not. However, when this does not work then nothing works.
As a test, I increased the GCMBC broadcast receiver and added the log statement to getGCMIntentServiceClassName () and PeekService (). When the app is running and a message arrives, I am called earlier. The OS then provides my service class immediately, as a result the phone is being called on.
When the app is not found, the GGMIMT service service calls (never called).
My manifest is pretty much Google's GCM examples boiler-plate code is too high.
Is there any additional permission or flag I need to set up for OS when my app awakens when it is not running and any message w / the correct intent category? My receiver is defined as:
& lt; Receiver Android: name = ".GCMBroadcastReceiver" android: permission = "com.google.android.c2dm.permission.SEND" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "com.google.android.c2dm.intent.RECEIVE" /> & Lt; Action Android: name = "com.google.android.c2dm.intent.REGISTRATION" /> & Lt; Category android: name = "PACKAGENAME" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; Keep in mind: This works when the app is running in the background.
Bleh figured out. David Wasser's answer is given here:
It says that when my app is not running I am not seeing the broadcast. I was forced to leave it from management applications, which puts it in the "closed" position (and this causes the system to broadcast it by default).
When I install the app, I launch it, under the power device, then turn it back on again, I'm getting the broadcast right.
Comments
Post a Comment