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
67
votes
8 answers

Is it possible to detect Android app uninstall?

My app is using Google's C2DM (push notification) to notify users about new activity from friends. Once they install the app I register the device with C2DM servers and store user's phone number. So I know that the user is using my app and I can…
android-developer
  • 1,574
  • 4
  • 20
  • 27
66
votes
4 answers

java.lang.RuntimeException: WakeLock under-locked C2DM_LIB

I have uploaded my application on google play but users have reported the following exception java.lang.RuntimeException: WakeLock under-locked C2DM_LIB. This exception occurs when I try to release the WakeLock. Can anyone tell what could be the…
Rookie
  • 8,660
  • 17
  • 58
  • 91
47
votes
4 answers

Android "hello world" pushnotification example

I am new to android application development and I am learning little bit. I am in a hard mission for sending push notification ( cloud messaging ) from my web server ( PHP ) to android application ( just a "helloworld" ). I did some "googling" and…
ramesh
  • 4,008
  • 13
  • 72
  • 117
36
votes
1 answer

C2DM: How to use C2D_MESSAGE permission?

I am about to implement C2DM for my application, but I find the documentation a bit confusing regarding how to write the manifest. The manifest code example contains this: device communication ? In my view, the alternative…
bdutta74
  • 2,798
  • 3
  • 31
  • 54
17
votes
3 answers

How to add a push notification in my own android app

I have developed a push notification application in Android from this tutorial:push notification in android app. The register button is displayed when I run the app. When I click on the register button, and when registration is successful, a…
user1676640
  • 635
  • 7
  • 17
  • 37
16
votes
8 answers

Ways to guess if C2DM is connected

I'm trying to place a best guess estimate as to whether C2DM messages can be received. I've created an application that relies on pushing information to a phone while it is physically inaccessible. I understand that C2DM isn't guaranteed delivery,…
Ian Elliott
  • 7,588
  • 5
  • 35
  • 42
15
votes
6 answers

How Google Cloud Messaging Service in Android Works?

I want to use GCM Service in my application. I have referred to the following link (Android Developer: Google GCM) but was not able to install the GCM Library in my eclipse. From the SDK manager I am not getting GCM Library in the Extras…
Bhavesh Patadiya
  • 25,740
  • 15
  • 81
  • 107
14
votes
1 answer

Android C2DM Auth token, one time or every time

I am outlining my plan to implement C2DM into an application and have a basic (read: stupid) question about the Auth tokens. The client server needs to register with the google c2dm service using the white listed account: For testing: curl…
bMon
  • 962
  • 4
  • 15
  • 33
14
votes
5 answers

Google Cloud Messaging for Android library vs. Google Play Services

Current Google GCM documentation requires you to install Google Play Services and to use them for GCM (Google Cloud Messaging). The library is 1.1MB, yet my current .apk is half that size. My app is intended to receive GCM and display some data on…
Xeos
  • 5,975
  • 11
  • 50
  • 79
13
votes
7 answers

Push notifications / C2DM for Kindle Fire?

AFAIK, push notifications require a Google account to work (they piggyback on GTalk), so does that mean for apps for the Kindle Fire are doomed if they use the standard C2DM approach? I couldn't find any info on push in the Kindle Fire FAQ or…
Artem Russakovskii
  • 21,516
  • 18
  • 92
  • 115
1
2 3
46 47