Questions tagged [android-c2dm]

Google Cloud Messaging for Android (GCM) - service for sending messages from third-party server to device.

The service provides a simple, lightweight mechanism that servers can use to tell mobile applications to contact the server directly, to fetch updated application or user data. The GCM service handles all aspects of queueing of messages and delivery to the target application running on the target device.

Characteristics

  • It allows third-party application servers to send lightweight messages to their Android applications. The messaging service is not designed for sending a lot of user content via the messages. Rather, it should be used to tell the application that there is new data on the server, so that the application can fetch it.
  • GCM makes no guarantees about delivery or the order of messages. So, for example, while you might use this feature to tell an instant messaging application that the user has new messages, you probably would not use it to pass the actual messages.
  • An application on an Android device doesn’t need to be running to receive messages. The system will wake up the application via Intent broadcast when the message arrives, as long as the application is set up with the proper broadcast receiver and permissions.
  • It does not provide any built-in user interface or other handling for message data. GCM simply passes raw message data received straight to the application, which has full control of how to handle it. For example, the application might post a notification, display a custom user interface, or silently sync data.
  • It requires devices running Android 2.2 or higher that also have the Market application installed. However, you are not limited to deploying your applications through Market.
  • It uses an existing connection for Google services. This requires users to set up their Google account on their mobile devices.

Google provides official documentation for this.

699 questions
5
votes
2 answers

Android, push messages to 1000 devices fast

I have implemented c2dm and it works fine that the device receives the message and everything. There is however one problem that I can't find a solution for. When a certain event occurs I want to push the same message to a few thousand devices…
Daniel
  • 53
  • 2
  • 6
5
votes
2 answers

android push notification to many devices at once time using google c2dm

I have successfully implemented the android push notification using google c2dm. I always send a post request for a device, and one device delay 1-2 seconds. So, if I have 1000 devices, my script will need more than 1000 seconds to finish the push…
Kannika
  • 2,538
  • 2
  • 27
  • 38
5
votes
1 answer

Using permissions that android 2.1 doesn't know (on android 2.1)

I am currently developing an app which pulls data from a server at a certain interval. I realize that this isn't the most efficient way since it will often poll the server without retrieving any new data. The solution for this would be to use C2DM,…
Lars
  • 4,082
  • 2
  • 20
  • 20
5
votes
1 answer

Use C2DM in Android-x86

I use Android-x86 installed in virtual box and communicating with adb to debug my android application. I know that since it is an open source project, it is not possible to use google API libraries. But I know that using Maps is possible (somepeople…
Jean
  • 51
  • 2
5
votes
3 answers

C2DMBroadcastReceiver's onReceive is not executing (For Registration)

Im developing a C2DM Messaging application. In that i order to receive the registration id im using the C2DMBroadcastReceiver, C2DMBaseReceiver and C2DMMessaging class. I will be C2DMReceiver in my package which extends the C2DMBaseReceiver. Here is…
Hussain
  • 5,552
  • 4
  • 40
  • 50
5
votes
2 answers

Android c2dm automatically unregistered

When I send a notification to a device, this device gets the push message, but it receive a "com.google.android.c2dm.intent.REGISTRATION" intent, not a "com.google.android.c2dm.intent.RECEIVE". If I try to send a second notification, I get the…
Guillem
  • 126
  • 1
  • 5
5
votes
2 answers

C2DM: Can I register for multiple sender-ids in the same app?

I have an app that manages a list of third-party servers and can poll them for information. These servers are supposed to be independent from each other (and potentially not under my control). Now I want to implement c2dm notifications to avoid…
user634618
  • 3,573
  • 1
  • 24
  • 17
5
votes
1 answer

GCM registering but not receiving messages on pre 4.0.4. devices

Please help me out if you can. I've been trying to implement a basic gcm setup. On the server side I'm using php code from the top answer over here - GCM with PHP (Google Cloud Messaging) And on the client side I've followed Google's GCM…
5
votes
2 answers

Launch application when GCM notification received

I have GCM notification implementation. I know that the client application receives the notification whether it is in the foreground, background or killed state. What I would like to know is, how can I launch my application on notification received,…
jasdmystery
  • 1,742
  • 1
  • 19
  • 31
5
votes
2 answers

GCM android Push Notification shows old message always. Intent received incorrect

I have a GCM notification implementation which works perfectly. But, the problems is once the message has been received in the intent in the received method, the message shown is always the old message. That is the the '…
jasdmystery
  • 1,742
  • 1
  • 19
  • 31
5
votes
2 answers

How to keep Listening for Push Notifications on Android in the background

I am working on Push Notifications in Android. Now the issue is that I want to keep running my Push Notifications on the back ground as soon as the app start because I have no idea when the server will push the data to the devices. The main…
Shax
  • 4,207
  • 10
  • 46
  • 62
5
votes
2 answers

broadcast intent callback: result=CANCELLED forIntent

I have a mobile app, that registers to a c2dm server. I have a server that sends a message to my app, to push a notification. The server receives ok result code from google c2dm. In LogCat i see that my app receives the message but immediately…
andrew
  • 2,797
  • 3
  • 18
  • 16
5
votes
1 answer

How can I send a message to a device using C2DM from a server that has been authenticated with OAuth2?

I'm developing the server part of a system that has to send messages to a device. This was working fine with the GoogleLogin method, but I want to migrate it to OAuth 2.0 since the other authentication method has been deprecated. In the Google API…
gcesarmza
  • 191
  • 11
5
votes
1 answer

C2DM Auth Error

I have an C2DM based application, which works fine, but recently I am getting Auth Error although I am getting the RID(Registration ID) and the message is being sent. Recently I read that Client Login keys are about to expire (Apr 30th), may be…
gaurav
  • 99
  • 5
5
votes
3 answers

Dynamic register of C2DM receiver using registerReceiver

I can register my android app with C2DM successfully using a in my manifest. However, if I delete the from the manifest and register my receiver using the method registerReceiver of the context, I receive a…
hectorct
  • 3,335
  • 1
  • 22
  • 40