-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Background notification does not working in 1.4.x #324
Comments
If I understand correctly, I believe I am having the same issue. On android, when the app is in the background, an incoming notification will trigger GCMIntentService.onMessageReceived, buzz the app, open the app, but will not trigger my listener (via push.on('notification') in js) to the "notification" event. |
FYI, downgrading to 1.3.0 also seems to resolve the issue for me. |
I'm not sure that I understand your problem. Here is the way it should work. App Open With the app open your App in Background With the app open you will see a notification in the shade as long as your payload from GCM has a title or message component. Your If you do not provide a title/message in the payload from GCM then your App Close (ie not running) You are pretty screwed at this point. Need to work on some code to restart the GCM service if the app is killed. Please let me know if you are running into a problem in any of the above scenarios or if you have a new scenario. |
This is what is not true for me with 1.4.2 on android only, in the "App in Background" bucket:
The app starts, but the event handler is not called. Not completely sure that is the same scenario as sonrebmax. |
Also, note that if the app is not in the background (no instance running), clicking on the notification in the shade will open the app and in fact call the notification event handler correctly. The issue I have is strictly when the app is in the background. I'm using a Moto G on Android 4.4.4, Cordova Android 4.1.1, phonegap-plugin-push 1.4.2. |
I done with this options.android.forceShow to true. As I wrote working fine in 1.3.0 not in 1.4.x (I checked 1.4.0 and 1.4.2) |
@sonrebmax is your issue when the app is open or when the app is in the background? If we are talking about different things, I'll create a separate thread. |
I wrote
|
Would you be able to elaborate on that statement a little bit? Might help me (and maybe @macdonst) understand a little bit more. Either way, at this point, I will create a separate thread, so as not to add any confusion. |
@macdonst do you understand what I mean? (my english is not good) |
in 1.3.0 = OK
in 1.3.0 = OK
in 1.3.0 = does not working |
Hello @macdonst, I am trying to prove/use your comment and the readme instructions regarding silent notifications. I think that some of the confusion may be coming from the various server side implementations. For instance: the problem that I am having is that when I pass notification: {}, which is where I normally put my title and message properties, I am not getting the onnotification to fire while my app is running, on the other side, in the background. Can you offer any clarification as to what else may be happening when gcm takes this format or the proper format that gcm will properly deliver? My server logs indicate that it is accepted but since I never get anything back I am unsure if it was mangled somehow to prevent final delivery. Or any insight within the assumption that gcm did perform final delivery and this plugins expected final result was what got mangled during transit? Or any expectations in between those possibilities. |
Nevermind, it appears that the issue was related to other conflicts that I monkey patched with stuff like library overrides. I got rid of the conflicting playservices plugin and now everything is working as it should. |
Same problem - silent notifications not received with 1.4+ I post them with curl string from google docs - successfull answer but nothing on phone. |
This thread has been automatically locked. |
For Android 5.0 with phonegap-plugin-push 1.4.2 - notification background is not working, but 1.3.0 is fine working... When app is open, did not get any notification, after closed app (minimzed) and clicked notification that push.on('notification') is fired. Anyone has the same problem?
Now I am working with phonegap-plugin-push 1.3.0...
The text was updated successfully, but these errors were encountered: