google-cloud-messaging

Is there a point in collecting registration tokens when using only the GCM Topics?

时光毁灭记忆、已成空白 提交于 2020-02-04 03:46:58
问题 I'm currently implementing Google Cloud Messaging into my app. Basically my app has categories and I need my users to be notifed about recurring events in those categories. I decided to use GCM Topics as a simple way to notify all the users subscribed to a specific category (I will have about 200-300 topics). My question is : Since I don't plan on notifying a single user but instead all users subcribed to a specific topic, is there a point in collecting the registration tokens on my server ?

GCM push notifications cause 502 Bad Gateway

五迷三道 提交于 2020-02-01 03:31:08
问题 I have an .Net windows service that sends GCM push notifications via https://android.googleapis.com/gcm/send. The service periodically sends batches of approximately 10,000 messages at a rate of 10 / second. With each batch, 5 - 10 of the messages will cause a "502 Bad Gateway" response. The messages that generate the 502 always go through with a second try. Is this normal? Could I be sending too many messages too quickly? 回答1: According to the GCM guide, all 5xx error codes should be treated

Error Creating json project configuration file for Implementing GCM Client on Android

谁说我不能喝 提交于 2020-01-30 08:33:46
问题 I am trying to get gcm working in my app. It is my job to update the app from the Eclipse build to the Android studio build. In the Android Studio build it no longer works to just plug in gcm.jar, so I am following this documentation: https://developers.google.com/cloud-messaging/android/client to get my app running with gcm. In order to do that I need to create a json configuration file. To make that file I must give google's configuration file creator my appId and my packageName. I have

API 2.3 GoogleCloudMessaging get only registration event

纵饮孤独 提交于 2020-01-25 13:12:45
问题 The code is very simple and perfectly works on API >= 3.0, but if I started at API 2.3 I'm getting the problem - Google send only registration events: protected void onHandleIntent(Intent intent) { Bundle extras = intent.getExtras(); GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this); String messageType = gcm.getMessageType(intent); if (!extras.isEmpty()) { if (GoogleCloudMessaging.MESSAGE_TYPE_SEND_ERROR.equals(messageType)) { //sendNotification("Send error: " + extras

Google Cloud Messaging (GCM) downstream message delay

十年热恋 提交于 2020-01-25 11:39:05
问题 I have downloaded and setup the Android gcm-client and gcm-demo-server (http server) from http://code.google.com/p/gcm/ . I have managed to receive downstream messages in my Android gcm-client app. I have done numerous tests with the following characteristics: The server used either a browser API key or a server API key. The data connection was either 3G or WiFi The sent message included/didn't include additional data. The sent message had/didn't have a collapse key. The sent message had

GCM Android notification received on device but not displaying

纵然是瞬间 提交于 2020-01-24 09:27:18
问题 GCM Cloud messaging notifications for my Ionic Android app are not appearing in my device's home screen, despite the notification registering in the app itself. I'm using the npm module node-gcm to send push notifications. var gcm = require('node-gcm'); var message = new gcm.Message({ priority: 'high', contentAvailable: true, delayWhileIdle: true, timeToLive: 10, dryRun: false, data: { key1: 'message1', key2: 'message2' }, notification: { title: "Hello, World", body: "This is a notification

GCM connection error

主宰稳场 提交于 2020-01-24 00:18:29
问题 I am trying out implementing gcm server application using XMPP(CCS) and i cant able to connect to the google servers. I am trying out the sample code from http://developer.android.com/google/gcm/ccs.html when i try to connect ccsClient.connect(userName, password); i get the following error gcm.googleapis.com:5235 Exception: XMPPError connecting to gcm.googleapis.com:5235.; : remote-server-error(502) -- caused by: XMPPError connecting to gcm.googleapis.com:5235.: remote-server-error(502)

internal error: retry receiver class not set yet

此生再无相见时 提交于 2020-01-22 19:01:24
问题 I am implementing a simple gcm push server notification to mobile but when I push from the server, the notification is not displayed on mobile phone. The log shows this error internal error: retry receiver class not set yet Can someone tell me how to fix this or give me a link to a gcm library that fix this error. I searched on the web, google say this error is fixed in a library version but I can't find it on the net. 回答1: This issue is solved by Android-GCM team but not released yet.Check

Google cloud messaging, service not available

白昼怎懂夜的黑 提交于 2020-01-21 09:01:48
问题 i'm creating an application and i'm using GCM to receive notifications, the problem is that when i call the function " gcm.register(SENDER_ID);" i'm getting "service not available". i searched a lot and many are facing this problem, i tried this solution: GCM SERVICE_NOT_AVAILABLE on Android 2.2 but it is not working,(regId is null) please any one can help? 回答1: The documentation says that: When the application receives a com.google.android.c2dm.intent.REGISTRATION intent with the error extra

Check if app is open during a GCM onMessage event?

允我心安 提交于 2020-01-20 03:25:10
问题 I am wondering how to check if my application is open and currently visible to the user when receiving an onMessage() from GCM. At first, I was just using my own boolean isVisible , but then I realized this isn't reliable, because if the app isn't open, the object I use to access that flag is null . While this in itself could be used to see if the app is open, it seems a little bit messy. Is there a way in Android from a system level to somehow check if the application is currently open, and