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

Android C2DM getting (401) Unauthorized

I have an Android application with an ASP.NET backend. I have the registration_id for the phone as well as an auth token from google for the application server that is performing a push. When I make the http post request to C2DM so that the phone…
Matt Wear
  • 1,211
  • 2
  • 15
  • 24
4
votes
2 answers

android c2dm registration Id fails

I am working on google's C2DM and have a program on the android emulator trying to get registration ID. But I get following errors: DEBUG/GoogleLoginService(171): onBind: Intent { act=android.accounts.AccountAuthenticator…
Srinivas
  • 41
  • 1
  • 3
4
votes
1 answer

Can I receive another Android app's C2DM Intents if I'm signed with the same signature?

I have an app (com.example.myapp) installed that received C2DM Intents. I would like to piggyback onto this to perform my own processing in response to these Intents in a separate app (com.example.myapp2). According to the this answer, the C2DM…
Heath Borders
  • 30,998
  • 16
  • 147
  • 256
4
votes
1 answer

Android GCM doesn't work with wifi networks when 3G network is available

I am developing app on Android GCM push notification. Everything works fine .But I am not able to get the notification message when my device is on wifi rather than on data plan of service provider. In my case data plan is 3G but and notification…
kaushal trivedi
  • 3,405
  • 3
  • 29
  • 47
4
votes
2 answers

Display Alert when push arrives

How Can I Display an alert when push notification arrives from C2DM or GCM. Right now I am displaying notifications on status bar. So How can I get a notification as an alert.
4
votes
1 answer

In blackberry does android player supports push notifications or C2dm?

I want to develop android application so that it also works on blackberry. I have searched that blackberry onward 10 and blackberry playbook supports android application and android player to run android applications. So in my application I'm using…
Ahmad Shahwaiz
  • 1,432
  • 1
  • 17
  • 35
4
votes
1 answer

When status registeredOnServer on Android GCM expire?

I got some debug message from logcat something like this: 07-20 15:38:41.007: V/GCMRegistrar(9023): Setting registeredOnServer status as true until 2012-07-27 15:38:41.014 When i call GCMRegistrar.setRegisteredOnServer(context, true); I'm not…
Somy A
  • 1,682
  • 15
  • 18
4
votes
3 answers

Leaked IntentReceiver in Google Cloud Messaging

I have implemented GCM in my app and I am using GSMRegistrar as suggested here. No I am getting an error in logcat 7-02 23:35:15.830: E/ActivityThread(10442): Activity com.abc.xyz.mnp has leaked IntentReceiver…
Gaurav Agarwal
  • 18,754
  • 29
  • 105
  • 166
4
votes
2 answers

Send Push notification in android

I want know something about push notifications. I am making a android apps and in this apps first user register to this android apps and data store on remote database which store on SQL SERVER and after that he logins. My question is that i want…
4
votes
2 answers

Android - Stop (Intercept) C2DM Push Notification if app is running?

I have implemented C2DM (Android Push Notification) to my app and all is working fine. However, when my app is running, I am able to get notifications. May I know how if I am able to stop the push notification from coming in if my application is…
user1321096
  • 143
  • 3
  • 14
4
votes
2 answers

C2DM with ClientLogin deprecated

Now when the ClientLogin authentication is deprecated should we use OAuth 2.0 for C2DM messaging? My application is C# web app that needs to send messages to registered devices. Any example how to get an Auth Token with OAuth to use with C2dm…
Maxim
  • 4,152
  • 8
  • 50
  • 77
4
votes
3 answers

Single device suddenly stopped getting C2DM pushes from my server

We have a working app and server that uses C2DM to push messages to Android devices. Two days ago one of our test devices stopped getting pushes from the server. The deviceRegistrationId the server sends to seems to be updated and correct, the…
marmor
  • 27,641
  • 11
  • 107
  • 150
3
votes
2 answers

How to create X tasks as fast as possible on Google App Engine

We push out alerts from GAE, and let's say we need to push out 50 000 alerts to CD2M (Cloud 2 Device Messaging). For this we: Read all who wants alerts from the datastore Loop through and create a "push task" for each notification The problem is…
Christer Nordvik
  • 2,518
  • 3
  • 35
  • 52
3
votes
8 answers

Reliability of C2DM

I am having issues with C2DM. Sometimes works perfectly, sometimes my messages simply do not get pushed. Is there reliable way to enforce this connection? To pull messages. I read somewhere that what google do is keep low bandwidth TCP connection to…
Evgeni Petrov
  • 1,313
  • 13
  • 28
3
votes
2 answers

C2DM / Phonegap plugin?

I would like to add Push messaging to my Phonegap Android App and believe that C2DM is the waybest way to make this work - could point me in the right direction to set this up? Is there a plugin or tutorial to help with this? Also - do I actually…
Dancer
  • 17,035
  • 38
  • 129
  • 206