google-cloud-messaging

Not able to receive GCM message in my device, even though the server got success message

不羁岁月 提交于 2019-12-30 11:23:02
问题 I got success message as response to web server (localhost) from gcm. But the message is not received by the devices. Please help. Below is the code which I used. Main Activity package vitpat.placement; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client

Not able to receive GCM message in my device, even though the server got success message

与世无争的帅哥 提交于 2019-12-30 11:22:08
问题 I got success message as response to web server (localhost) from gcm. But the message is not received by the devices. Please help. Below is the code which I used. Main Activity package vitpat.placement; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client

GCM error SERVICE NOT AVAILABLE

丶灬走出姿态 提交于 2019-12-30 11:20:12
问题 I'm have a problem on moment of register on GCM server, a message is show in my log: SERVICE NOT AVAILABLE. I tried several option, but not get good results: Already enable the dependency of google_play_service, Already check the time ofclock, time zone set with Brasilia, Already check all I know Follows below my code. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.clientechattcc" android:versionCode="1" android

Post to GoogleCloudMessaging returns 400 InvalidTokenFormat

こ雲淡風輕ζ 提交于 2019-12-30 11:09:29
问题 I'm trying to post to Googles Cloud Messaging Api (GCM), but my request fails with response HTTP/1.1 400 InvalidTokenFormat . However, if I change my program so that it connects to localhost instead, and I simply pipe the request it makes through to something else that transmits the request to GCM, the request succeeds. Below is the code that fails: import java.net.URL; import java.net.HttpURLConnection; import java.io.OutputStream; public class GcmPostMe { public static void main (String[]

Post to GoogleCloudMessaging returns 400 InvalidTokenFormat

青春壹個敷衍的年華 提交于 2019-12-30 11:09:25
问题 I'm trying to post to Googles Cloud Messaging Api (GCM), but my request fails with response HTTP/1.1 400 InvalidTokenFormat . However, if I change my program so that it connects to localhost instead, and I simply pipe the request it makes through to something else that transmits the request to GCM, the request succeeds. Below is the code that fails: import java.net.URL; import java.net.HttpURLConnection; import java.io.OutputStream; public class GcmPostMe { public static void main (String[]

Sending Push Notification on multiple devices

谁说我不能喝 提交于 2019-12-30 10:42:15
问题 I'm trying to make an push notification on my android app by following this tutorial http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/ I already got this tutorial working, but my problem is. It only send notification one by one. I need to send the notification to all gcm_id or registered id by just sending once. Do anyone already solved this issue? here is my index.php <!-- To change this template, choose Tools | Templates and open

Switch GCM Client on Development and Production

血红的双手。 提交于 2019-12-30 10:35:30
问题 Just implement the new GCM. For official document, Copy the google-services.json file you just downloaded into the app/ or mobile/ directory of your Android Studio project. Anyone know how to setup gradle to switch development and production to use different google-services.json? 回答1: I have just answered a similar question here for different productFlavors . In your case it's debug/production. I don't know why you need to switch between production and debug but i think you can do the same as

Cordova Push Plugin: onNotificationGMC is not fired and cannot obtain regID

我是研究僧i 提交于 2019-12-30 09:34:21
问题 Hello everyone I'm developing a cordova Hybrid app that requires the Push Notification Service of Android and iOS to work and so I've installed the cordova plugin "PushPlugin". Here's my code document.addEventListener("deviceready", deviceready, false); function deviceready() { try { pushNotification = window.plugins.pushNotification; pushNotification.unregister(successHandler, errorHandler); pushNotification.register( successHandler, errorHandler, { "senderID": "7645XXXXXXXX", "ecb":

Receive GCM push notification in node.js app

非 Y 不嫁゛ 提交于 2019-12-30 06:49:45
问题 I'm building a command-line application in node.js and would like to receive GCM push notifications (the command-line app will be interacting with the same set of services that iOS/Android apps use, hence wanted to use the same notification service). Given that GCM can be used on iOS (and thus is not Android-specific) I am hoping it can be used from node.js as well. I've seen many articles about sending push notifications from node.js, but haven't been able to find anything about using node

How to send silent push to iOS via Google Cloud Messaging

你。 提交于 2019-12-30 06:00:42
问题 How to send silent push notification to iOS application over GCM? Silent push is notification that will not appear in notification center, but awake application to do some action in background. Google introduce new features in new GCM with possibility to send push messages to Android, Chrome and iOS. Any idea, how to do this? 回答1: Use the content_available (not content-available ) attribute like this: curl -X POST --header "Content-Type:application/json" --header "Authorization:key