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
3
votes
3 answers

C2DM collapse_key implementation explanation needed

hi I cannot see any explanation of the implementation of the collapse_key. I think i understand what it does but not how it do it! Android Cloud to Device Messaging Framework I have a C2DM framework set up and sending 4 types of messages to many…
Erik
  • 5,039
  • 10
  • 63
  • 119
3
votes
2 answers

What is the most scalable push notification system on Android?

I am writing a messaging application for Android. Because 30% of Android users are still on 2.1, I have decided we will not use Google's C2DM system for push notifications, which requires 2.2+. Does anyone have experience building medium to large…
plowman
  • 13,335
  • 8
  • 53
  • 53
3
votes
1 answer

How can I dynamically change the Notification message when I aggregate multiple notifications in Android?

I'm trying to perform this simple task dealing with push notifications in Android (C2DM): if no notification exists in the notification bar, set it to "foo A" if a notification already exists, grab it, read its text, and then update it to something…
Artem Russakovskii
  • 21,516
  • 18
  • 92
  • 115
3
votes
1 answer

If I register multiple Android devices in C2DM, do I receive multiple Registration IDs

Regarding C2DM, if I have a phone and another device (another phone, potentially a GoogleTV, etc) and I setup a C2DM server, will I receive two different Registration ID's that I can then use to send intents to both devices? What seems like it may…
Mickey Kawick
  • 187
  • 1
  • 12
3
votes
1 answer

Android C2DM sleeping phone

According to this Android C2DM keeps a socket alive with a heartbeat mechanism, making it able to receive push messages. This made me hope I could deliver messages to sleeping phones with an active wifi connection. I've made an implementation…
marko
  • 2,841
  • 31
  • 37
3
votes
1 answer

Android C2DM server send message

I try to test c2dm app. I have sign up for Android Cloud to Device Messaging. http://code.google.com/android/c2dm/signup.html For example: Contact email * Email address we should contact when you've been whitelisted: aaa@gmail.com Role account…
user430926
  • 4,017
  • 13
  • 53
  • 77
3
votes
2 answers

C2DM with lower API level?

For C2DM to work, a device clearly must be at API level 8. However, does this really require that the application be compiled at that level? None of the code to work with C2DM requires any APIs at level 8. So would it be possible to have an app at a…
michaelg
  • 2,692
  • 1
  • 17
  • 16
3
votes
2 answers

How can I initialize the Sender ID for Android C2DM without using a hard-coded value in a static variable?

I'm adding Android C2DM to a Android library project. I started with the com.google.android.c2dm package that is included with JumpNote and Chrome To Phone. In order to use this package, you have to subclass the C2DMBaseReceiver service which…
ajh158
  • 1,477
  • 1
  • 13
  • 32
3
votes
2 answers

Android Crash During Register Push Notifications

I am using gcm.jar for Push Notifications. When I start my app I am trying to register Push notifications but it always crashed. 06-04 10:08:32.479: E/BroadcastReceiver(26774): BroadcastReceiver trying to return result during a non-ordered…
user123456
  • 265
  • 2
  • 14
3
votes
2 answers

How can I declare the name of GCMIntentService in the Manifest if the project contains sub packages?

I already on a GCM project which is able to receive and message from Google Server after Registration. This project contains only one package (com.example.gcm), and all classes (GCMIntentService ...) are declared in this package. The code below…
13KZ
  • 1,295
  • 5
  • 24
  • 43
3
votes
2 answers

What is the difference between C2DM and GCM

What is the difference and which one is better? I am planning to develop an android application that will send a notification from one user of the app to another user of the same app using PHP, so which one is suited for developing this…
FinalDark
  • 1,748
  • 1
  • 16
  • 26
3
votes
3 answers

Is GCM service reliable for large scale push notification?

I want to push notifications to around 50,000 users at a time and about 50 notifications per day, is it a good choice to use GCM in this case? If not can i know which other push services can i use , i dont mind even if its a paid service.. Thanks in…
user1918034
  • 191
  • 4
  • 16
3
votes
4 answers

android GCM push notifications

I have successfully set up the code to run GCM over phonegap on an android app. I have managed to secure the handset registration ID and able to send a message to the app using this ID in a PHP script. My only problem is that the message displays as…
3
votes
0 answers

c2dm receives NotRegistered after gcm registration

I've run into a pretty bizarre problem with c2dm. Seeing as it's deprecated, I've begun the process of migrating to gcm. Due to the design of this product, I can't simply register for gcm and send the new registration id to my backend and forget…
hankystyles
  • 511
  • 2
  • 8
3
votes
2 answers

app isn't woken up on receiving gcm message broadcast

I've recently added GCM messaging to my app using google's helper classes (GCMBroadcastReceiver, GCMBaseIntentService). It works beautifully when the app is running, both when it's in the foreground and when it's not. However, when it's not…
jph
  • 2,181
  • 3
  • 30
  • 55