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

android c2dm registration ID

I read in the explanation in Android Cloud to Device Messaging Framework. After our app register successfully to C2DM server, we receive a registration ID. The registration ID lasts until the application explicitly unregisters itself, or until…
user430926
  • 4,017
  • 13
  • 53
  • 77
7
votes
2 answers

Is there a GCM registrationId pattern?

/** * @author Sebastien Lorber (lorber.sebastien@gmail.com) */ public enum EnumDeviceType { ANDROID { @Override public boolean validateDeviceIdentifier(String deviceIdentifier) { Preconditions.checkArgument(…
Sebastien Lorber
  • 89,644
  • 67
  • 288
  • 419
7
votes
1 answer

java.lang.SecurityException: Not allowed to start service Intent

I am getting the following exception from the users on google play: java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gsf (has extras) } without permission…
Rookie
  • 8,660
  • 17
  • 58
  • 91
7
votes
2 answers

GCM (Google Cloud Messaging) not sending error on uninstall of app

I'm trying to migrate from C2DM to GCM, and it mostly works just fine. C2DM used to handle uninstalls of the app very well by sending a NotRegistered error when the user uninstalled the app. GCM supposedly does this as well (albeit not guaranteed).…
Shreshth
  • 160
  • 6
7
votes
4 answers

Discovering if Android activity is running

I'm using C2DM, my BroadcastReceivers propagate the C2DM events to a local service. the service complete the registration by sending the id to my webserver pus it's responsible for letting the device know about new messages, however if the…
codeScriber
  • 4,582
  • 7
  • 38
  • 62
6
votes
2 answers

how to retrive Registration id and send message to third-party application in android c2dm0+

The sender ID is used in the registration process for c2dm.but there has no receive messages or any register id. //Akashc2dmActivity.java file public class Akashc2dmActivity extends Activity implements OnClickListener { Button Register,id; …
Akash Singh
  • 5,171
  • 2
  • 26
  • 55
6
votes
1 answer

Starting LocationManager as Service Android

What I'm attempting to do is when receiving a c2dm message, start a service that asks for location for 'x' amount of time and then hands that location off to our server. The c2dm message starts the service correctly, and the GPS location turns on,…
RyanInBinary
  • 1,533
  • 3
  • 19
  • 47
6
votes
2 answers

What is device quota per day for Android c2dm?

Does anyone know device quota per day for Android c2dm? PS: Im not interesting in application quota that is 200 000.
Alexey Zakharov
  • 24,694
  • 42
  • 126
  • 197
6
votes
2 answers

Bad sides of C2dM

We all know that as of Android 2.2 a push notification system exists (C2dM). However, I do not see many developers using it. In my next project I plan (hope so) to use this system. So before I dig into it, I would like to know what are the bad…
sandalone
  • 41,141
  • 63
  • 222
  • 338
6
votes
2 answers

Simple implementation of Android C2DM required

I am trying to implement Android c2dm. I have looked into documentation and seen the jump note and chrome to phone samples that are provided... But i couldnt really figure out the process. It would be great if i could simple implementation of c2dm…
Rahul Kalidindi
  • 4,666
  • 14
  • 56
  • 92
6
votes
4 answers

Problem registering for C2DM in Android

I'm trying to test the C2DM framework. I got the confirmation email a couple of days ago and then tryied to create a client that could register. For that purpose, I created a simple client following the steps described in this tutorial:…
Bilthon
  • 2,461
  • 8
  • 36
  • 44
6
votes
2 answers

Does whatsapp use c2dm aka GCM on android?

I always thought WhatsApp uses c2dm for message delivery. But when I see running apps MessageService is always running. You don't need a service to be run to receive c2dm. Why keep the service running all the time? Facebook is even more strange…
Taranfx
  • 10,361
  • 17
  • 77
  • 95
6
votes
1 answer

Receiving Android GCM Notifications when application is in stopped state

on one of our applications that uses GCM, we've been receiving reports that the app stops receiving notifications when the app has been killed. When the app is started again, the notification appear as normal. After investigation, we found out that…
Mopper
  • 1,677
  • 2
  • 18
  • 41
6
votes
1 answer

What is the proper way to initiate network communication based on receiving a Broadcast Intent?

I'm getting started with Google's C2DM. Part of this process involves receiving a Broadcast Intent when registration has occurred. In Google's official C2DM documentation, the example code shows the following comment in the BrodcastReceiver's…
6
votes
3 answers

MDM Agent on iOS

I worked on MDM in Android, and used the API's to lock, wipe etc when I receive a C2DM push message from the server. When I was trying to explore more on the iOS part of it, I was a bit confused. I got a feeling that, we don't need to code a agent…
nithinreddy
  • 6,167
  • 4
  • 38
  • 44