Question

I've been trying to catch a push notification when the app is not running or in background mode.

I found this module https://github.com/jayeshIT/Google-Cloud-Messaging-Titanium

And only works when my app is running or in background mode. There is a way to catch push android without ACS ???? p.d. I tried creating a service with a interval but only works when the app is in background or running please help!

Was it helpful?

Solution

In order to implement push notifications for Android without using a third party service such as ACS or UrbanAirship, you must implement your own application server that stores and retrieves device registration ids that are created by Google-provided GCM Connection Servers. Here is the Google documentation for implementing a GCM Server.

Basically, push notifications are sent from the sending device to the application server and then through Google's GCM Servers to the destination devices, where the devices' operating system receives the push notification an displays it appropriately.

It may be easier to implement push notifications initially using one of the free accounts on the third party services (ACS, UrbanAirship), and once the mobile functionality is developed and tested, implement the application server and refactor the mobile code as needed.

Hope this helps. If so, please up-vote (need the rep to use other features in SO :)

OTHER TIPS

I would start with the Urban Airship module: https://marketplace.appcelerator.com/apps/4984

The module has support for iOS and GCM and its open source. Here are the direct links to the builds: android and ios

http://urbanairship.com/ They have a free tier. If nothing else this will get you started, and once you have this setup it will be easier to try and do it yourself.

There's plenty of documentation for setting up the API Key's for GCM, do you need me to track those down to?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top