google-cloud-messaging

what does gcm.notification.e=1 stand for, into push notification payload on Android?

孤街醉人 提交于 2020-01-02 06:17:58
问题 I'm writing an Android application which receives downstream messages from a server using Google Cloud Messaging. When receiving a message with onMessageReceived I print the bundle and read this: RECEIVED PUSH NOTIFICATION: Bundle[{gcm.notification.e=1, gcm.notification.badge=1, gcm.notification.sound=default, ..etc... I don't understand the key gcm.notification.e in the notification payload. On Google documentation I didn't find anything like that. Moreover, when sending the message, I

what does gcm.notification.e=1 stand for, into push notification payload on Android?

两盒软妹~` 提交于 2020-01-02 06:16:52
问题 I'm writing an Android application which receives downstream messages from a server using Google Cloud Messaging. When receiving a message with onMessageReceived I print the bundle and read this: RECEIVED PUSH NOTIFICATION: Bundle[{gcm.notification.e=1, gcm.notification.badge=1, gcm.notification.sound=default, ..etc... I don't understand the key gcm.notification.e in the notification payload. On Google documentation I didn't find anything like that. Moreover, when sending the message, I

Display Alert when push arrives

泪湿孤枕 提交于 2020-01-02 05:46:06
问题 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. 回答1: 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

GCM doesn't work on Android 4.2.2?

孤者浪人 提交于 2020-01-02 05:22:13
问题 I have a peculiar problem with GCM: it doesn't seem to send pushes to phones that are running on Android 4.2.2. I have eight phones that I test on, ranging from 2.2 to 4.2.2, and the one running 4.2.2 was not receiving pushes. We sent out the apk to some contacts who have 4.2.2 phones, and they were able to confirm that only on the 4.2.2 phones push failed. All in all, we tested our app on over 15 devices, five of which were on 4.2.2, and it was only those five that could not receive pushes.

GAE, PHP and GCM: failed to open stream: HTTP request failed! HTTP/1.0 405 Method Not Allowed

ε祈祈猫儿з 提交于 2020-01-02 05:20:49
问题 I'm developing a web application (using GAE for PHP) that notifies android clients (via GCM - Google Cloud Messaging) when some content are available for download. The following PHP script should do job: $json = array( 'data' => array( ... ), 'registration_ids' => array( ... ) ); $data = json_encode( $json ); $context = array( 'http' => array( 'method' => 'post', 'header' => 'Authorization: key=MY_SECRET_KEY' . "\r\n" . 'Content-Type: application/json' . "\r\n", 'content' => $data ) );

SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (has extras) }

故事扮演 提交于 2020-01-02 04:50:06
问题 I try to get my GCM registrationId from Google. my code: String SENDER_ID = "722******53"; /** * Registers the application with GCM servers asynchronously. * <p> * Stores the registration ID and the app versionCode in the application's * shared preferences. */ private void registerInBackground() { new AsyncTask<Void, Void, String>() { @Override protected String doInBackground(Void... params) { String msg = ""; try { if (gcm == null) { gcm = GoogleCloudMessaging.getInstance(context); } regid =

Migrate from GCM 2.0 to GCM 3.0 InstanceID API

℡╲_俬逩灬. 提交于 2020-01-02 04:11:09
问题 Currently I have released my application on play store and in that project i am using compile 'com.google.android.gms:play-services:7.0.0' Google play services Library Version 7.0 to implement Push notification using Google cloud messaging in my project. Google play services library version 7.0 uses old registration procedure using register() method GoogleCloudMessaging.register(SENDER_ID); But Googel documentation says. GCM register() is deprecated starting May 28, 2015. New app development

Google Developer Console's credential side permission

坚强是说给别人听的谎言 提交于 2020-01-02 03:53:29
问题 I got an problem after i create and APIs on Google Developer Console and enable the GCM service, but i want to add an server key at Credential next to APIs on left hand menu. But it show me You do not have sufficient permissions to view this page. Below are the image: Is that any config i need to add? I did follow what You do not have sufficient permissions to view this page to clear cache and use incognito mode to login, but still not work. EDIT Some time i relogin it work back, when i click

Notification Auto-Cancel does not call DeleteIntent

让人想犯罪 __ 提交于 2020-01-02 01:12:19
问题 I'm implementing GCM in my app and keeping a hash of notifications to keep track of what is in the notification shade (I have to change intents based on if the user is in or out of app). I set the deleteIntent PendingIntent for all my notifications. All this does is remove the Notification from my local hash so it won't be updated anymore. The intent is fired fine if I clear all or swipe to delete a notification. However, I also set my notifications to auto cancel. Clicking on a notification

Notification Auto-Cancel does not call DeleteIntent

寵の児 提交于 2020-01-02 01:12:06
问题 I'm implementing GCM in my app and keeping a hash of notifications to keep track of what is in the notification shade (I have to change intents based on if the user is in or out of app). I set the deleteIntent PendingIntent for all my notifications. All this does is remove the Notification from my local hash so it won't be updated anymore. The intent is fired fine if I clear all or swipe to delete a notification. However, I also set my notifications to auto cancel. Clicking on a notification