android-c2dm

HttpURLConnection c = URL.openConnection(); c.setRequestProperty() Doesn't work

杀马特。学长 韩版系。学妹 提交于 2019-11-30 10:51:33
This Code here is a normal Java application not an android application, this is designed to send C2DM messages to a device with YOUR_REGISTRATION_STRING as the developer with auth_key, the problem is described below import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLSession; public class C2DMSendMessage { private final static String AUTH =

Leaked IntentReceiver in Google Cloud Messaging

有些话、适合烂在心里 提交于 2019-11-30 10:29:05
I have implemented GCM in my app and I am using GSMRegistrar as suggested here . No I am getting an error in logcat 7-02 23:35:15.830: E/ActivityThread(10442): Activity com.abc.xyz.mnp has leaked IntentReceiver com.google.android.gcm.GCMBroadcastReceiver@44f8fb68 that was originally registered here. Are you missing a call to unregisterReceiver()? What I can understand from this and looking at the code for GSMRegistrar is I need to to call GSMRegistrar.onDestroy(this) but I could not understand where should I call this? Calling in onDestroy() of activity mnp causes it to stop retrying for GSM

android c2dm registration ID

你说的曾经没有我的故事 提交于 2019-11-30 07:24:43
I read in the explanation in Android Cloud to Device Messaging Framework. After our app register successfully to C2DM server, we receive a registration ID. The registration ID lasts until the application explicitly unregisters itself, or until Google refreshes the registration ID for your application. When is exactly Google refreshes the registration ID for your application?? How do we know it so we can register again and send our new registration ID to our server. Thank you. According to discussions on the android-c2dm mailing list, refreshing the registration ID is not a frequent event, but

C2DM TO Google Cloud Messaging (GCM)

六月ゝ 毕业季﹏ 提交于 2019-11-30 05:01:53
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 app with a new version updating the tokens on my servers ... OR I can keep the parallel systems which is something I don't think it's a good solution OR Continue using C2DM until it's finished, then I die with it :-) azgolfer Although client side migration is easy (just change the 'sender' from email address to a project id), you will still face

Google restricts FCM service based on IP Address, Is there any other free Android push notification provider?

大憨熊 提交于 2019-11-30 04:22:34
问题 I start to write down a simple push notification App using FCM For Android. But I got this message in my Android studio Log. signInWithCustomToken com.google.firebase.FirebaseException: An internal error has occurred. [ This service is not available from Iran. If you believe the country of origin was incorrectly identified, please report it at https://support.google.com/websearch/contact/ip. ] My Android (client) app works fine[Successful Registering and Signing In and Receiving notification]

Registration confusion Android GCM

假装没事ソ 提交于 2019-11-29 18:25:34
问题 I am trying to migrate to GCM in Android, C2DM now being deprecated. The registration process described here is different from registration described here. Are both registration same? Can we see code for GCMRegistrar to know for sure? 回答1: They are actually the same thing. The second one encapsulates the first one in a static method and registers a broadcast receiver. You can attach the source to the gcm.jar and see for yourself. You can find source code in ~/android-sdks/extras/google/gcm

Long-polling vs Apple Push Notification Service & Android C2DM [closed]

扶醉桌前 提交于 2019-11-29 17:45:34
问题 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 long-polling or direct connection to my server rely on Apple Push Notification Service and Android C2DM Beyond the fact that APNS and C2DM provide a unified interface to push notification while the application is running or not, one can say that a custom

SERVICE_NOT_AVAILABLE some devices on Android GCM

天大地大妈咪最大 提交于 2019-11-29 16:19:49
I made an app using GCM for notifications. I used this tutorial and my code is pretty much identical http://developer.android.com/google/gcm/client.html I'm testing on physical devices and on some of the devices I am getting a SERVICE_NOT_AVAILABLE error when I try to register the device with GCM. I have an exponential backoff setup so it does retry over time. It works on about half of my test devices the others get a SERVICE_NOT_AVAILABLE error. Looked all over and haven't found a solution yet. Any help would be greatly appreciated. Thank You! Shobhit Puri SERVICE_NOT_AVAILABLE might mean

Leaked IntentReceiver in Google Cloud Messaging

感情迁移 提交于 2019-11-29 15:20:38
问题 I have implemented GCM in my app and I am using GSMRegistrar as suggested here. No I am getting an error in logcat 7-02 23:35:15.830: E/ActivityThread(10442): Activity com.abc.xyz.mnp has leaked IntentReceiver com.google.android.gcm.GCMBroadcastReceiver@44f8fb68 that was originally registered here. Are you missing a call to unregisterReceiver()? What I can understand from this and looking at the code for GSMRegistrar is I need to to call GSMRegistrar.onDestroy(this) but I could not understand

google cloud messaging security

一个人想着一个人 提交于 2019-11-29 12:36:56
问题 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 registration IDs. Attacker creates his own app, bakes in Company's sender ID and server registration interface, puts app in the store. The attack app basically impersonates Company's real app as far as GCM goes: it registers to receive messages from