google-cloud-messaging

How to send silent push to iOS via Google Cloud Messaging

感情迁移 提交于 2019-12-30 06:00:09
问题 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

Google Cloud Messaging for Android Library not Found in the sdk Manager

送分小仙女□ 提交于 2019-12-30 02:51:08
问题 I am trying to implement a push notification solution for android.I am following the steps given in the following tutorial http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/ but when i tried to install the Google Cloud Messaging for Android Library using the android sdk(i am using the latest sdk) i don't find it the extras module like you can see in this picture This is really strange. Is there any solution? 回答1: Install Google Play

Google cloud messaging Limit

左心房为你撑大大i 提交于 2019-12-29 08:55:29
问题 I know that exists similar questions on site, but I confused because http and xmpp have difference limit: this page say differences between http and xmpp . first limit is [ xmpp & http ]: up to 4KB of data second limit is: http : You can send out a message to 1000 users at a time. (ref) xmpp : For each sender ID, GCM allows 1000 connections in parallel. (ref) You can send out a message to 1000 users at a time. so if you have more users you'll have to send the message multiple times from your

HTTP response code 401 in Google GCM

醉酒当歌 提交于 2019-12-29 08:30:07
问题 Below is the exception I am getting even though my API key for server and browser application are valid. I checked it using curl. I send GCM request in both format UTF-8 and JSON. Testing it from outside corporate network. java.io.IOException: Server returned HTTP response code: 401 for URL: https://android.googleapis.com/gcm/send at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java

ios Google Cloud Messaging (GCM) not receiving remote notifications

假装没事ソ 提交于 2019-12-29 08:27:12
问题 Problem: iOS isn't receiving any remote notifications from GCM, but can't find any information relating to why this would be the case. First time implementing push notifications, not sure what the cause of problem is. Situation: I am currently working on the iOS version of an app that uses GCM for push notifications. Notifications are being received fine on Android, however, it doesn't appear to be receiving at all on iOS. When I run the application, the console shows me that everything is

Is there any reason to continue using IntentService for handling GCM messages?

瘦欲@ 提交于 2019-12-29 07:44:51
问题 As you know, recently Google changed their GCM documentation, and they claim that an IntentService is no longer required for handling arriving GCM messages. All the handling can be done in the BroadcastReceiver . When trying to figure out if there is any good reason to continue using the IntentService , I came across this quote: A Service (typically an IntentService) to which the WakefulBroadcastReceiver passes off the work of handling the GCM message, while ensuring that the device does not

Problems implementing the new GCM Client for Android

。_饼干妹妹 提交于 2019-12-29 07:43:19
问题 I'm trying to implement the new GCM Client on Android following the guidelines from Google (https://developers.google.com/cloud-messaging/android/client). I'm receiving slightly different errors for two different devices. I noticed that I receive NoSuchMethodError for method getNoBackupFilesDir for both the devices. This is the logcat for an Android 4.2.2: 06-08 09:01:09.920: I/dalvikvm(9138): Could not find methodandroid.app.Notification$Builder.setLocalOnly, referenced from method com

I've Got This Response From The GCM Server {“success”:1} But the Notification not Come to the Device

元气小坏坏 提交于 2019-12-29 06:30:46
问题 I am trying to Notify the Device by the Push Notification I Received this Response From THE GCM Server {"multicast_id":8594338261894783737,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1355822022916886%8ae6056ef9fd7ecd"}]} But Still Not get the Notification With Knowledge That --> "success":1 But I Think there is something Wrong Here --> "canonical_ids":0 This Is My Code ... private string SendGCMNotification(string apiKey, string postData, string postDataContentType =

I've Got This Response From The GCM Server {“success”:1} But the Notification not Come to the Device

醉酒当歌 提交于 2019-12-29 06:30:11
问题 I am trying to Notify the Device by the Push Notification I Received this Response From THE GCM Server {"multicast_id":8594338261894783737,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1355822022916886%8ae6056ef9fd7ecd"}]} But Still Not get the Notification With Knowledge That --> "success":1 But I Think there is something Wrong Here --> "canonical_ids":0 This Is My Code ... private string SendGCMNotification(string apiKey, string postData, string postDataContentType =

GCM unregister causing the application to crash

人走茶凉 提交于 2019-12-29 04:30:52
问题 I've implemented GCM notifications on my app. I am now trying to un-register the app when the user logs out. I am using the following code. When this code executes, it causes the application to crash with the following logcat: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in /data/app/com.example.packagename-1/base.apk) at com