Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Do not receive push notifications when application runs in background

$
0
0

I'm developing an application in which I want to use push notifications. I'm currently working on the Android version of the app, and I use the cloudpush module. On the server side, I use Google Cloud Messaging (GCM) to send the notifications with a HTTP POST request as it is describe on this page. It works fine when the apps runs in foreground, I receive the push notifications, but when the app runs in background, I don't receive the notifications any more. If I bring the app to foreground, the notifications still don't come, and if I kill the app and restart it, then I receive the notifications that have been sent while the app was in background.

The most mysterious thing is that if I send a push notification from the "my apps appcelerator console", I receive it when the app is in background (and also when it is in foreground obviously).

I'm thus wondering if, in my HTTP POST request (to send a notification to GCM), I need to pass a special parameter to enable the delivery of the notification even when the app is not in foreground ?

Any help would be much appreciated.

Jean

some details about my config:

Application type: mobile

Titanium SDK: 3.2.2 GA

Device: Moto G (Android 4.4.2)


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>