android-c2dm

PHONE_REGISTRATION_ERROR C2DM on Ice cream sandwich AVD

℡╲_俬逩灬. 提交于 2019-12-05 18:23:38
I try to run my C2DM application in ice cream sandwich AVD , but it prompt PHONE_REGISTRATION_ERROR during the C2DM registration. The same code working fine on froyo/gingerbread anyone know how to fix this? This is an error code returned from Google's C2DM servers. Documentation says: PHONE_REGISTRATION_ERROR Incorrect phone registration with Google. This phone doesn't currently support C2DM. So, I guess , C2DM currently simply hasn't been enabled on 4.0 AVD. 来源: https://stackoverflow.com/questions/7887090/phone-registration-error-c2dm-on-ice-cream-sandwich-avd

Android GCM doesn't work with wifi networks when 3G network is available

你。 提交于 2019-12-05 17:41:29
I am developing app on Android GCM push notification. Everything works fine .But I am not able to get the notification message when my device is on wifi rather than on data plan of service provider. In my case data plan is 3G but and notification comes as usual to devices but when device is connected through wifi I am not able to get any notifications. Well this should not be the case, I have an android app that receives GCM push notifications regardless it is connected via 3G or Wi-Fi. What I would suggest to troubleshoot this problem: When you send the push notification from the server make

Display Alert when push arrives

别来无恙 提交于 2019-12-05 14:40:56
How Can I Display an alert when push notification arrives from C2DM or GCM. Right now I am displaying notifications on status bar. So How can I get a notification as an alert. Popping a dialog in the middle of something a user is doing is a wildly user hostile thing to do. What if they're playing Angry Birds and you've just ruined their shot? Only the platform can and should get away with that. Use the notification area, like Google intended, UNLESS you app currently has control (your activity is in running state). Then just use that activity's context to pop an AlertDialog() . You can detect

How to keep Listening for Push Notifications on Android in the background

坚强是说给别人听的谎言 提交于 2019-12-05 10:57:02
I am working on Push Notifications in Android. Now the issue is that I want to keep running my Push Notifications on the back ground as soon as the app start because I have no idea when the server will push the data to the devices. The main requirement is that our corporate app is having more than 10 activities and based on the notification received, I have to bring the related activity on the foreground so that user can preform action on that or do some silent action in the background regardless the activity is in foreground. Can somebody suggest how can I implement this type of requirement.

Dynamic register of C2DM receiver using registerReceiver

不打扰是莪最后的温柔 提交于 2019-12-05 10:46:07
I can register my android app with C2DM successfully using a <receiver> in my manifest. However, if I delete the <receiver> from the manifest and register my receiver using the method registerReceiver of the context, I receive a SERVICE_NOT_AVAILABLE error response. I have reproduced this behaviour in the emulator and in a real device. Is dynamically registering a C2DM receiver possible? This is the fragment of the manifest I deleted: <receiver android:name=".service.C2DM.C2DMReceiver" android:permission="com.google.android.c2dm.permission.SEND"> <intent-filter> <action android:name="com

C2DMBroadcastReceiver's onReceive is not executing (For Registration)

≡放荡痞女 提交于 2019-12-05 09:23:20
Im developing a C2DM Messaging application. In that i order to receive the registration id im using the C2DMBroadcastReceiver , C2DMBaseReceiver and C2DMMessaging class. I will be C2DMReceiver in my package which extends the C2DMBaseReceiver . Here is my code snippet C2DMMessaging.java package com.google.android.c2dm; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.util.Log; public class C2DMessaging { public static final String EXTRA_SENDER

Not allowed to start service Intent X without permission Y

末鹿安然 提交于 2019-12-05 01:29:35
04-25 14:16:30.931: E/AndroidRuntime(6638): FATAL EXCEPTION: main 04-25 14:16:30.931: E/AndroidRuntime(6638): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { (has extras) }} to activity {com.exclusive26.igale/com.exclusive26.igale.Push_Activity}: 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 com.google.android.c2dm.permission.RECEIVE 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.ActivityThread

“TooManyMessages” Error coming from c2dm.intent.RECEIVE Intent

天涯浪子 提交于 2019-12-04 21:52:11
Does anyone have any documentation on this "TooManyMessages" error . After I call the GoogleCloudMessaging send method I am getting an intent from com.google.android.c2dm.intent.RECEIVE with the following key/value pairs in the extras bundle. Send error: Bundle[{error=TooManyMessages, message_type=send_error, google.message_id=1, android.support.content.wakelockid=1} This means that too many messages were stored in the GCM server for a single device without being delivered (which might happen if your device was offline while many messages were sent by your server). Once the number of such

Why and how is push-notification (like GCM) battery efficient?

大兔子大兔子 提交于 2019-12-04 16:08:59
问题 Wanted to understand the fundamental reasons for push-notification like Google Cloud Messaging (earlier called Google Cloud to Device Messaging) being more battery friendly, for cloud <--> device communication ? In my view, the alternative technologies involve "polling" (over TCP/IP) while keeping the connection in CONNECTED state, using keep-alives. Or is there something better ? My limited undertanding of GCM is that, it also uses TCP/IP and keepalives, but the client never polls the server

Reliability of C2DM

牧云@^-^@ 提交于 2019-12-04 15:09:14
问题 I am having issues with C2DM. Sometimes works perfectly, sometimes my messages simply do not get pushed. Is there reliable way to enforce this connection? To pull messages. I read somewhere that what google do is keep low bandwidth TCP connection to their server at all time. So I assume that when switching between network types TCP connection falls down and Android tries to reestablish connection to C2DM servers. So that might fail on WiFi with restricted network. Is that wrong assumption? I