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
1 answer

C2DM or XMPP -- what is better for push notifications

I am building a web based chat application like gtalk. What should I use among C2DM and XMPP. Is there any other alternative? What is the failure-success ratio of C2DM. Thanks
Ram
  • 141
  • 1
  • 5
3
votes
1 answer

UrbanAirship android broadcastreceiver

com.myapp.myapp:com.urbanairship.process ERROR AndroidRuntime java.lang.RuntimeException: Unable to start service com.urbanairship.push.PushService@40cfdc08 with Intent { act=com.urbanairship.push.START…
skalber
  • 467
  • 4
  • 14
3
votes
3 answers

C2DM server. Should we use OAuth now?

I'm implementing C2DM for my Android app. Client side (Android) went well, but I'm little bit confused on implementing server side. My server is C#/.NET. Official documentations links to 404 when it comes to…
katit
  • 17,375
  • 35
  • 128
  • 256
3
votes
2 answers

Notifications don't come through when the app is closed

I've got an Android app with push notifications set up using Urban Airship. The notifications work fine while my app is open but I need to still receive notifications when my app is closed. I've looked around but haven't found something that works.…
Mike T
  • 4,747
  • 4
  • 32
  • 52
3
votes
1 answer

Google+ push notifications in own Android app

Is it possible to register my app to receive Google+ push notifications? As I understand it, apps are identified by their package name to make sure the correct application gets sent the notification. Would it be possible to get Android to notify my…
icke
  • 1,568
  • 1
  • 19
  • 31
3
votes
6 answers

Send push notifications on android without using C2DM

Is it possible to send push notifications to an android application without using Google server: C2DM? So, I would like to have my own server which sends notifications directly to the app, but I'm not sure how are the notifications perceived by the…
Cosmin
  • 33
  • 1
  • 4
3
votes
2 answers

Are C2DM notifications be replaceable?

I'm using C2DM notification service. When I send 2 consecutive notification, I can see only the second one. My question is can notifications form same service are replaced?
vicky
  • 1,046
  • 2
  • 12
  • 25
3
votes
1 answer

C2DM inapp registration: unable to start service Intent

OK, I really don't know what I'm lacking here. I try to get C2DM working for our application and especially handling the Broadcasts make me struggle. We have an appwide BroadcastReceiver: public final class AppBroadcastReceiver extends…
nuala
  • 2,681
  • 4
  • 30
  • 50
3
votes
2 answers

Android - Cannot receive C2DM Registration Intent

I am attempting to register my device with C2DM and am having major issues. I have followed several tutorials, all of which are very similar. I believe the issue has to do with the registration intent that it sends to the C2DM server. Does anyone…
ariets
  • 4,218
  • 4
  • 28
  • 34
2
votes
1 answer

different auth tokens for google account

I got a php code using cURL to get Google auth token for Gmail account. I am using it for C2DM. Everytime I run that script, I receive a different auth token. I thought every google account has an auth token which only gets refreshed sometimes. But…
Kishan
  • 424
  • 6
  • 20
2
votes
1 answer

C2DM - error response from Google endpoint: MismatchSenderId

I'm trying to create an application that uses c2dm service. So. First I used google email/password get an authentication key from the c2dm server for the application. The android app, registers with c2dm server with a different email to get a…
sap
  • 1,141
  • 6
  • 41
  • 62
2
votes
1 answer

Does urban Airship work on C2DM on backend on Android?

How Urban Airship does really work. Does it work same as C2DM on backend. what are the requirement for Client that want to use push notification from Urban Airship.
waseemwk
  • 1,499
  • 3
  • 15
  • 44
2
votes
3 answers

Getting primary email for using C2DM in android

I want to use a C2DM which will allow my Java Server to send Data to Android phone. Since for using C2DM each device need its gmail ID, my Question is that how can i get the default email associated with the android phone and use this email in C2DM.…
waseemwk
  • 1,499
  • 3
  • 15
  • 44
2
votes
1 answer

C2DM: does Google enforce 1-to-1 between apps and sender accounts?

When you sign up for C2DM with a Google account, you specify the name of the app package that you will be sending messages to. Question - if you want to send messages to several apps, do you have to register several times? Do they have to be…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
2
votes
1 answer

How to wake up Android from sleep by c2dm notification and start activity?

How to wake up Android from sleep by c2dm notification and start activity? I want to create something like incoming call.
Alexey Zakharov
  • 24,694
  • 42
  • 126
  • 197