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

Android application stops receiving c2dm messages after a while

we've been trying to develop an android application which uses the c2dm service of Google. When we start the application after clearing all data, the application receives the c2dm messages just fine, but after some time (maybe 2 minutes) the…
Mark268
  • 78
  • 1
  • 8
0
votes
2 answers

Android broadcast receiver running always

How do I make a broadcast receiver which runs always, from the very start of the device? Is this possible without starting the application where it is declared? If not I guess I would have to start my application when the device starts. But this…
User
  • 31,811
  • 40
  • 131
  • 232
0
votes
3 answers

Hard to understand Android C2DM

I've followed the tutorial on Vogella C2DM tutorial like most people trying to understand C2DM have, it's a great tutorial to get the code but it doesn't really help me understanding how to use it. I've set up my Android classes and my server…
simtaxman
  • 613
  • 2
  • 11
  • 18
0
votes
1 answer

Notifications on an app after it is shut down with the 4.0 android task manager?

I'm using C2DM in my application, and I have a receiver, which sends data to a class in the application. The class creates a notification and notifies the notification manager to post it. The problem is that this does not work when the app is…
0
votes
1 answer

c2dm messages never received

I'm having a hard time receiving messages via c2dm. Actually occasionally I receive messages from our server but it's literally just the half of the data. (I'm expecting a 4 digit number and received only the first 2 digits.. o.O"). However recently…
nuala
  • 2,681
  • 4
  • 30
  • 50
0
votes
1 answer

php c2dm code false response

Hello there i'm writing a code for c2dm with php this is the code in drupal module, my problem is it is working on my localhost "wamp" server but when try using it on my centos 5 server, the var_dump($response) returns bool(false), my domain is…
0
votes
1 answer

C2DM message is not received

why is C2DM push notification message sometimes cannot be received by the device although the status is success? Thanks
Rendy
  • 5,572
  • 15
  • 52
  • 95
0
votes
1 answer

Receivng intent broadcasts when application is shutdown

I'm using C2DM the first time and I'm looking for a general advice how I can achieve the following: Upon receiving a C2DM messages I decide: - if the application is upon the current activity will display an "alert popup". - if the application is…
nuala
  • 2,681
  • 4
  • 30
  • 50
0
votes
1 answer

Appcelerator Titanium V8 Runtime Disposed while C2DM Receives

I have succesfully included a C2DM Module (Android's Cloud to Device Messaging Framework) in my project and have been able to succesfully register and receive Android push notifications. However, I have noticed that every once in a while, when I…
avivas
  • 173
  • 1
  • 3
  • 17
0
votes
1 answer

Syncing with App Engine tutorial

I am attempting the Syncing with App Engine tutorial in the Resources section of Android Developers. I installed the GPE, SDKs, set-up a C2DM account, and updated all my software. The instructions to create and debug the project were…
xray
  • 1
0
votes
1 answer

Refresh Registration ID C2DM when device is off-network

I am interested in implementing C2DM for the push notification feature in my application. However, when I read the docs https://developers.google.com/android/c2dm/#lifecycle It states that: "Note that Google may periodically refresh the…
Rendy
  • 5,572
  • 15
  • 52
  • 95
0
votes
1 answer

Mail Account For C2DM Registration

I am using C2DM for "Push Notification" on Android. Every thing is okay. My question is; can I get "if device has more than synchronized gmail accounts, which one is used for C2DM"?
sem
  • 61
  • 1
  • 9
0
votes
1 answer

Android GPRS C2DM

In a particular scenario we are registering a device for C2DM notifcation. It is successfully getting the notification when notification triggered from Third party server. Now In case If the GPRS connection for the mobile device gets lossed however…
Relsell
  • 771
  • 6
  • 18
0
votes
2 answers

android C2DM notifications not working prior to android 4?

I trying to make push notifications work for my android app. The server seems OK since I receive notifications on my android 4 device. But I have other devices with android 2.2.1 and 2.3.4 that don't receive the notifications. Here's my C2DMReceiver…
Alexis
  • 16,629
  • 17
  • 62
  • 107
0
votes
1 answer

Android C2DM: What is the best way to handle if the device if off

I'm using C2DM in a project. I want to show device status (battery remaining, sdcard availability...) when user logs in my website. Here is my implementation: Upon their log in, the 3rd-application server (my website) will send a "login" push…
Bao Le
  • 16,643
  • 9
  • 65
  • 68