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

Migrating to GCM but still have C2DM registration id

I am in the process of migrating my android app from C2DM to GCM. I have the server-side setup to receive both with an indication of the IDs that are GCM vs C2DM, and then on the server side I send out via the appropriate service depending on the…
0
votes
1 answer

speedy_c2dm: NoMethodError (undefined method `gsub' for nil:NilClass)

I set up speedy_c2dm to send "push" messages to android devices. The gem was working fine, but now I get this NoMethodError message when I call SpeedyC2DM::API.send_notification(options) the options parameter is good, I have verified this. From the…
marimaf
  • 5,382
  • 3
  • 50
  • 68
0
votes
1 answer

Android C2DM Registration BroadcastReceiver stopped working

After working for months, my C2DM registration broadcast receiver stopped receiving broadcasts to it's onReceive method. I know google is moving to GCM. Is the C2DM service still running or is it not working because Google turned it off?
Atma
  • 29,141
  • 56
  • 198
  • 299
0
votes
1 answer

Always getting Unauthorize error(401) in c2dm android

Actually,i have used ramachandru6@gmail.com as a "sender id" in my app and that same id and same password used for getting authentication tocken.but still am getting 401 error. i have spent more than two days.please any one guide me.what i have to…
rkv
  • 131
  • 6
0
votes
1 answer

Show I open my activity inside the onReceive of BroadcastReceiver when received a Push Notification

When using Android Push notification, the onReceive of the registered BroadcastReceiver is being called when the device receive the notification. The issue is should I open my activity immediately inside the method onReceive? Because sometimes the…
Howard
  • 19,215
  • 35
  • 112
  • 184
0
votes
1 answer

Specifying multiple application packages in C2DM

I have an Android application that uses C2DM. I am creating another application derived from it. Currently, Google don't support C2DM, they moved to GCM. But I want to use the C2DM for the derived app still. Is it possible to add multiple packages…
ssk
  • 9,045
  • 26
  • 96
  • 169
0
votes
1 answer

What is new in Android GCM update Version 3?

I went to SDK manager today and found google has released GCM update verison 3. I tried to find what is new in the update 3 but could not get hold of any document released by google. My Question What is new in GCM update version 3, can we find any…
Gaurav Agarwal
  • 18,754
  • 29
  • 105
  • 166
0
votes
1 answer

Starting application on C2DM message

i have an app that sends a c2dm message to another device, I am wondering how could I start a certain activity or application when the c2dm message is recieved? Can I send an intent to do this in a c2dm message or is there a better way to do this?
user1501171
  • 210
  • 1
  • 3
  • 17
0
votes
1 answer

Can you use google-api-ruby-client with Google Cloud Messaging (GCM)?

Google Cloud Messaging appears to only provide sample code in Java. I run ruby on my servers and wish to use google-api-ruby-client to power my GCM installation instead. Are there any guides on how to do this? I just want "hello world" for GCM using…
esilver
  • 27,713
  • 23
  • 122
  • 168
0
votes
1 answer

What happens if a C2DM or GCM Receiver's onReceive function fails during a Registration Intent?

if a C2DM or GCM Receiver's onReceive function fails during a registration intent for some crazy reason, like some exception is raised or the phone is powered off or whatever, can I count on Android replaying that registration intent? otherwise I…
0
votes
1 answer

Android C2DM messages are lost?

I'm sending notifications with android C2DM. I'm using C2dmSharp. I'm trying to send 200 different notifications to my phone. Server-side I get an OK response with an id=[ID of sent message] (like documented here) so I guess my serve is doing well.…
Alexis
  • 16,629
  • 17
  • 62
  • 107
0
votes
2 answers

GCM Push Notification without using JSON

I am trying to migrate my application from C2DM service to new GCM push notification. I have successfully integrated the GCMIntentService class which extends GCMBaseIntentService. When I send the push notification from server using PHP, the GCM…
Timson
  • 1,337
  • 3
  • 19
  • 32
0
votes
1 answer

what does “GCMRegsistrar.register” do?

follow this link:https://developer.android.com/guide/google/gcm/demo.html At home i can run the gcm demo successfully. But in the company, it runs failed with ‘authentication failed’ I think there is something wrong with the networks in my…
inza9hi
  • 114
  • 1
  • 10
0
votes
1 answer

AppEngine Connected Android Project not working after update

I updated my SDK tools and SDK platform tools to the latest and to my horror found that AppEngine Connected Android project's emulator not launching if I do Debug as > Local AppEngine connected Android Project. I am working on a project and also…
vincent mathew
  • 4,278
  • 3
  • 27
  • 34
0
votes
4 answers

Trying to set up GCM demo application - device registration doesn't work

So I've been following Google's tutorial to set up GCM demo apps on an Android emulator (the one here: http://developer.android.com/guide/google/gcm/demo.html). I got the server side working - I have a tomcat server that displays "No devices…