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

What time interval should tell me if I should use poll or push notifications?

The general rule is to use push notifications if the app does not update regularly (at specific time of day) or not so often. But what does this mean in simple words? What is this time interval said in hours/days/weeks/...? In other words, based on…
sandalone
  • 41,141
  • 63
  • 222
  • 338
0
votes
1 answer

Android, looking for a simple way to accurately determine if a device is C2DM capable?

I'm looking for the simplest way to write a boolean function that will tell me if the device the app is running on is capable of using C2DM. I am aware that the presence of the Android Google Play app is guaranteed to ensure C2DM capability but not…
jamesc
  • 12,423
  • 15
  • 74
  • 113
0
votes
1 answer

Server Error with sun.security.pkcs11.SunPKCS11

I have been successfully developing with Google AppEngine/Android C2DM stuff for many months now. Suddenly, after updating with all the latest Android and AppEngine dev SDK's etc., even the Eclipse built in "App Engine Connected Android Project"…
aez
  • 2,406
  • 2
  • 26
  • 46
0
votes
1 answer

C2DM message expiration

Does anyone know for how long Google will try to deliver a C2DM message before it gives up (even approximately)? 1 week? 2 weeks? 1 day? Of course assume registration is correct and everything but say, the device is offline. Of course I've already…
iliask
  • 535
  • 2
  • 7
  • 18
0
votes
1 answer

Activity started by Notification doesnt get updated

I am receiving some json messages with C2DM, so far this is good. Having the json message extracted from the C2DM payload, I create a notification that upon user click will open an activity that will display the message received. The first time the…
Thiago
  • 5,152
  • 11
  • 35
  • 44
0
votes
1 answer

Does anyone know why C2DMConfigLoader (c2dm-server.jar) was changed subtly?

In an eclipse c2dm connected project, the c2dm-server.jar is generated for you and added to your project. If you dig inside the source for it you'll see that it's pretty much the same as the source from the original chrometophone…
jdbethun
  • 83
  • 5
0
votes
1 answer

C2DM with App engine

I am constructing an application and planning to use C2DM with app engine running on my application server, I am wondering is their a sample project or tutorial online that involves using C2DM and App engine, I have tried googleing but I cannot find…
MattTheHack
  • 1,354
  • 7
  • 28
  • 48
0
votes
1 answer

Android Notifications + C2DM

I've got two classes, Main and C2DMReceiver -- I want the receiver to obviously receive push notifications from C2DM, but I need context in order to push task bar notifications to the UI -- context which is only found in classes extending Activity.…
Brian D
  • 9,863
  • 18
  • 61
  • 96
0
votes
5 answers

Android C2DM Wont register

I have used This guide. But if i add it to another project, i dont receive anything: I have made changes to the manifest so it matches the guide(I think): Question: But now i dont get any response to my registration attempt.
Anders Metnik
  • 6,096
  • 7
  • 40
  • 79
0
votes
1 answer

C2DM registration error

I trying to register c2dm, but allways give me this error: 05-18 10:48:32.357: D/C2DMRegistrar(225): [C2DMRegistrar.46] register: http error 400 this is the register method: public static final String EXTRA_SENDER = "sender"; public static final…
0
votes
1 answer

Automate multiple registrations of 'sender' accounts for Android C2DM?

I'm wondering if it is possible to develop a script to submit multiple apps - ALL AT ONE GO OR ONE BYE ONE - to Android Cloud to Device Messaging (https://developers.google.com/android/c2dm/signup). We have multiple apps to register on a regular…
Venu
  • 7,243
  • 4
  • 39
  • 54
0
votes
1 answer

Android C2DM send extras from server side

How to send extras from server side like userId or eventId using c2dm and get from my android application in onMessage() function ? This is SendMessage on server side function C# private static void SendMessage(string authTokenString, string…
FlorinD
  • 481
  • 2
  • 8
  • 25
0
votes
1 answer

Android FATAL EXCEPTION: IntentService[lectorc2dmuser@gmail.com]

@Override protected void onMessage(Context context, Intent intent) { Log.e("C2DM", "Neue Message."); Intent resultIntent = new Intent(context, ResultActivity.class); resultIntent.putExtra("message", "Message received"); …
Anders Metnik
  • 6,096
  • 7
  • 40
  • 79
0
votes
2 answers

C2DM unregister automatically

I have an Android application that uses C2DM. I define the receivers in the main activity (not in the manifest). I have something like this: c2dmReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent)…
Lourdes
  • 11
  • 1
  • 3
0
votes
1 answer

Sqlite code should be executed only once

I am developing a app using android C2DM. sqlite3 is my back-end. Everything is just working fine but am struck with an performance issue regarding sqlite3. so my question is 'can i place the database code somewhere where it will be executed only…
TheIlliterate
  • 119
  • 2
  • 9