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
13
votes
9 answers

Android two player game to be played in internet

I have developed a simple two player chess game in android to be played using Bluetooth. I want to extend it by making it possible to be played through internet. whenever a player makes a move, the move should be transferred to the other player via…
androidGuy
  • 5,553
  • 12
  • 39
  • 56
13
votes
2 answers

GCM FC / sender id not set on constructor

I have gotten some strange StackTraces from users of my app recently: Android Version: 2.3.5 Phone Model: GT-I9001 Stacktrace: java.lang.IllegalStateException: sender id not set on constructor at…
ligi
  • 39,001
  • 44
  • 144
  • 244
13
votes
3 answers

C2DM TO Google Cloud Messaging (GCM)

As you may have seen, Google is migrating its Push Notification System. Google Developer guide for GCM I guess I am not alone wondering : are the tokens obtained from C2DM still valid for GCM ? If not, it means that I need all my users to update my…
12
votes
1 answer

What is the Android GSF package?

What is it the GSF_PACKAGE I found in the C2DM Tutorial? To be precise: public static final String GSF_PACKAGE = "com.google.android.gsf" It was used in intent: registrationIntent.setPackage(GSF_PACKAGE); On the developers site I found this:…
lomza
  • 9,412
  • 15
  • 70
  • 85
12
votes
2 answers

Android C2DM port number choice

I noticed that the Google C2DM (push) tcp connection uses port 5228. I also know that some firewalls block ports other than 80 443 (because of htttp and https), which causes lots of users to complain that they can't use the Market app or GTalk on…
Erdal
  • 1,472
  • 3
  • 16
  • 33
12
votes
1 answer

Long-polling vs Apple Push Notification Service & Android C2DM

I am building a mobile application that has some realtime constraints. Therefore I turn to stackoverflow to get advices & opinions and attempt to decide which is the best solution to update the state of the application while running: rely on…
12
votes
5 answers

Android GCM push notification for localization application

I have a single android application, which supports for 7 countries(Localization and Internationalization). The application functionality and language changed based on the device locale. I need to implement the GCM push notifications for this…
12
votes
3 answers

Push notifications on Android: Google GCM vs. Amazon SNS?

My Android app needs simple push notifications to be informed about the appearance of new data on a server. Android provides Google Cloud Messaging (GCM) which would seem to fit. However, devices running lower than Android 4.0.4 require a Google…
11
votes
2 answers

Android C2DM Push Notification

I am developing one application and in that application I need to implement push notifications. Can anyone suggest how I should go about implementing push notifications? If I could be provided with a good tutorial, that would be great! Thanks.
Chirag
  • 56,621
  • 29
  • 151
  • 198
11
votes
3 answers

Android C2DM Registration_ID max size

What is the maximum possible size of the registration_id field used for Android C2DM service?
floater
  • 111
  • 1
  • 4
11
votes
4 answers

Google Cloud messaging - Sample Server

I need a sample application for Google Cloud messaging. with a sample server to test my app. can any one help me on this? I need a sample server to test my code i already written the code but i dont know wheather it will work or not. i dont know…
Dinu
  • 600
  • 3
  • 6
  • 27
11
votes
7 answers

google cloud messaging security

Company creates a project and receives a sender ID. Company creates an app, bakes in its sender ID and places the app in the store. Attacker reverse engineers the app and extracts both the sender ID and the server interface used to receive GCM…
jph
  • 2,181
  • 3
  • 30
  • 55
11
votes
3 answers

C2DM with PHP using OAuth2.0 (ClientLogin is deprecated!)

Note: Before you spend your time reading on, please know that C2DM is itself deprecated now and replaced by GCM (http://developer.android.com/guide/google/gcm/c2dm.html) -- Original question -- Do we have example code for implementing PHP…
Doc
  • 1,094
  • 10
  • 18
10
votes
3 answers

Is there any push notification service in Android like Apple Push Notification Service?

I want to provide a push notification service to Android phone users, is there any push notification service in Android like Apple Push Notification Service?
user403015
  • 7,209
  • 19
  • 66
  • 100
10
votes
2 answers

Anyone doing C2DM on Android

I need to implement c2dm in my app. Is there anyone who is also doing this? Please help..some tutorials will be very helpful OR if you have completed your c2dm implementation then a tutorial is more than appreciated. Please help.
mudit
  • 25,306
  • 32
  • 90
  • 132
1
2
3
46 47