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
2 answers

What is the best way to push data to the device?

I am making a web app that needs to communicate with the Android phone, what is the best way to get data from the web app to the phone? I have heard of C2DM but I don't know any good guides for it. I have tried polling, but that is way too heavy on…
Qasim
  • 1,686
  • 4
  • 27
  • 51
3
votes
2 answers

How do I get C2DM push notifications to work together with WiFi enabled?

I've done an app which uses C2DM pusn notifications. Everything works fine as long as I am connected to the GSM/3G network but when I switch to WiFi it does not always work and I do not receive push notifications. I understand the technical problems…
Henrik
  • 1,983
  • 3
  • 28
  • 52
3
votes
0 answers

Debugging Push Notification

I am using C2dm for push notification and as per these instructions we got at last response code 200 but not get notification on device (Samsung Galaxy Tab 2.2). what will be the reason for that ?
M Singh
  • 41
  • 1
  • 7
3
votes
3 answers

What are the advantages of using urban airship over C2DM

The title pretty much sums it up. What's the difference between those services exactly and what are the advantages of using one over another ? I'd like to know what's the difference between UA and APN of apple as well ?
Iyad Al aqel
  • 2,020
  • 3
  • 21
  • 32
3
votes
1 answer

what is causing this stack trace? (gtalkservice & jivesoftware.smack)

Details below but basically I'm trying to understand what on my Droid is throwing this error. Details: I'm trying to get up to speed with C2DM. I'm testing using Urban Airship's Push Notification service (pretty cool so far IMO) to send a…
Justin
  • 6,031
  • 11
  • 48
  • 82
3
votes
1 answer

C2DM retry registration permission denial

Any ideas on how to solve this permission denial error on retry registration event are greatly appreciated. Permission Denial: broadcasting Intent { act=com.google.android.c2dm.intent.RETRY flg=0x4 (has extras) } from com.my.package (pid=-1,…
jamesc
  • 12,423
  • 15
  • 74
  • 113
3
votes
1 answer

C2DM Push notifications What causes 401 unauthorisation errors?

UPDATE SOLVED - Thank's to @MusiGenesis persistence with this I solved the problem by registering a new Google mail account and a new C2DM account. After updating the relevant credentials in the web server and the android app all started working…
jamesc
  • 12,423
  • 15
  • 74
  • 113
3
votes
1 answer

Server for android chat

I've faced a problem of writing a backend on Java for the chat with Android clients. What are the best practices for it? After quick googling i've found some approaches: Polling / long polling. c2dm. Seems like an easy variant, but i'm afraid of…
madhead
  • 31,729
  • 16
  • 153
  • 201
3
votes
1 answer

Can I use one registered C2DM account for multiple apps

I have a platform that is up to 14 branded applications now. I am implementing C2DM and am wondering if I need a registered C2DM account for each application. I just tried it out in the emulator and got a new registration token for the second app…
digidigo
  • 2,534
  • 20
  • 26
3
votes
1 answer

How to send c2dm message from rails app

EDIT 3 I use RhoMobile to get device_token, which I am getting to server def register_device @person = Person.find(:first) unless System.get_property('is_emulator') url =…
pcasa
  • 3,710
  • 7
  • 39
  • 67
3
votes
1 answer

Handling the C2DM error ACCOUNT_MISSING in Android

The registration for C2DM may result in an error ACCOUNT_MISSING. This error must be handled, according to the documentation, in this way "The application should ask the user to open the account manager and add a Google account." I would like to…
3
votes
1 answer

Is Android Cloud 2 Device Messaging (C2DM) compatible with Google's 2-step verification?

I've been reading up on Android's cloud 2 device messaging (C2DM) and all the documentation mention ClientLogin as the authentication method. However the ClienLogin info page specifically states its not compatible with 2-step verification and…
loafoe
  • 363
  • 2
  • 11
3
votes
5 answers

Android C2DM registration ID

I'm building an app that uses c2dm. I think that I'm supposed to ask for a registration ID whenever my app's main "intent" starts up. I've been doing this, but it seems that each request results in a new string, so I end up piling up numerous…
Frank LaRosa
  • 3,533
  • 6
  • 26
  • 32
3
votes
2 answers

Can not add google account in Google App Emulator

I am trying to implement my first Android C2DM aplication. I have difficulty in adding a google account. My machine is behind a proxy, but I have added an APN with the proxy,port,username,password details. I can go to the google account page using a…
need_the_buzz
  • 423
  • 2
  • 9
  • 18
3
votes
1 answer

Android C2DM ROLE account and package name

In the C2DM sign up form, (out of many things) we are asked with the following two: A package name for the application receiving the messages A ROLE account email ID which will be used to send messages to the C2DM server. My question is : Are…
advantej
  • 20,155
  • 4
  • 34
  • 39