android-c2dm

Anyone doing C2DM on Android

感情迁移 提交于 2019-11-27 18:53:13
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. I went ahead and downloaded the Chrome2Phone source code for android and understood how it works through that example, I had the most trouble implementing the server side of the App. Download it from: http://code.google.com/p/chrometophone/source/checkout or svn it: svn checkout http://chrometophone.googlecode.com/svn/trunk/ chrometophone-read-only Basic things you

Android C2DM getting (401) Unauthorized

吃可爱长大的小学妹 提交于 2019-11-27 18:47:55
问题 I have an Android application with an ASP.NET backend. I have the registration_id for the phone as well as an auth token from google for the application server that is performing a push. When I make the http post request to C2DM so that the phone gets a message I keep getting the 401 Unauthorized. Here is how I'm making the request in .NET: WebRequest myRequest = WebRequest.Create("https://android.apis.google.com/c2dm/send"); myRequest.ContentType = "application/x-www-form-urlencoded";

Push notifications / C2DM for Kindle Fire?

社会主义新天地 提交于 2019-11-27 16:07:28
问题 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 anywhere on the web. 回答1: As far as I know yes. Everything I have read indicates that Amazon stripped C2DM support out of the Fire. I know right? If you or your users are willing to root it, installing Google services is an option. Urban Airship has a

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

偶尔善良 提交于 2019-11-27 14:30:42
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; private static PowerManager.WakeLock mWakeLock; private static final String WAKELOCK_KEY = "C2DM_LIB"; @Override protected void onCreate(Bundle savedInstanceState) { if (mWakeLock == null) { PowerManager pm = (PowerManager) Akashc2dmActivity.this .getSystemService(Context.POWER_SERVICE); mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_KEY

java.lang.RuntimeException: WakeLock under-locked C2DM_LIB

我怕爱的太早我们不能终老 提交于 2019-11-27 11:04:58
问题 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 problem. 回答1: I have traced same exception in new GCM Library too. Actually old C2DM Android library have same error, same crash, and Google hasn't fixed it yet. As I can see by our statistics, about 0.1% of users experiencing this crash. My

Android C2DM Push Notification

雨燕双飞 提交于 2019-11-27 09:53:56
问题 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. 回答1: // Call when your application start public void StartRegistrationNotification() { Intent registrationIntent = new Intent("com.google.android.c2dm.intent.REGISTER"); registrationIntent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent()

How to add a push notification in my own android app

廉价感情. 提交于 2019-11-27 06:46:08
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 notification is displayed on my device. How can I include it in my own app? My app has one xml parsing example app. Here when any new item is added, I wish to display (the new order is displayed ) a notification message on the device. It is automatically generated here. I am posting demo application of Google Cloud Messaging . Make sure you create demo

Is there a GCM registrationId pattern?

允我心安 提交于 2019-11-27 06:14:38
问题 /** * @author Sebastien Lorber <i>(lorber.sebastien@gmail.com)</i> */ public enum EnumDeviceType { ANDROID { @Override public boolean validateDeviceIdentifier(String deviceIdentifier) { Preconditions.checkArgument( !Strings.isNullOrEmpty(deviceIdentifier) ); return ANDROID_REGISTRATION_ID_PATTERN.matcher(deviceIdentifier).matches(); } }, IOS { @Override public boolean validateDeviceIdentifier(String deviceIdentifier) { Preconditions.checkArgument( !Strings.isNullOrEmpty(deviceIdentifier) );

Google Cloud messaging - Sample Server

痞子三分冷 提交于 2019-11-27 05:30:14
问题 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 server side coding so anyone could help me on this. here is my code intent service package com.example.pushnotificationsample; import android.content.Context; public class GCMIntentService extends GCMBaseIntentService { protected GCMIntentService

Discovering if Android activity is running

こ雲淡風輕ζ 提交于 2019-11-27 03:33:02
问题 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 application (one of the activities) is up we want to send an intent to that activity with the new data so it can be updated, if not than the NotificationManager is used to notify the user. The issue is, how to know the activity is running ? the Application