google-cloud-messaging

What are some ways of troubleshooting GCM after message gets to Google's servers?

流过昼夜 提交于 2019-12-13 05:26:04
问题 I have been banging my head on this for days. I am able to register my phone just fine with GCM, and send a message from the server side to Google. With Google's diagnostics this is easier than ever to confirm: However, the message is not getting sent to my phone. According to the diagnostics page and docs, the status will change to "Delivered" once the phone is online and the message can be retrieved, however, this is never happening. All the tutorials out there don't help with this problem

GCM notification doesn't show up in the notification bar. Android

让人想犯罪 __ 提交于 2019-12-13 05:23:53
问题 I have tested my application on my phone and eclipse emulator(targeted at google api level 16), but the coming notification will only show up in the notification bar in the real phone but not in emulator. Any ideas whats going on here? 回答1: Can you check that you can get a regID when you work on emulator? GCMRegistrar.checkDevice(this); GCMRegistrar.checkManifest(this); final String regId = GCMRegistrar.getRegistrationId(this); if (regId.equals("")) { GCMRegistrar.register(this, SENDER_ID); }

GCM Push Server side, which API Key to use?

丶灬走出姿态 提交于 2019-12-13 05:22:23
问题 I'm a bit confused. I have a GCM PHP server side app server that uses a key from Google Developer Console. I can create Android key as per the instructions given in getting started guide here, or I can create a browser key, server key or OAuth key. Can somebody tell which key I should use on the server side PHP when sending messages via GCM to Android devices? This is the function that sends the message to GCM public function send_notification($registatoin_ids, $message) { // include config

GCM Android - continuously hear sound and vibrate when received notification

丶灬走出姿态 提交于 2019-12-13 04:53:35
问题 I push notification from GCM Server to all clients. Continuously hear sound and vibrate until I pull down the notification bar. Here's my code: private static void generateNotification(Context coNtext, Bundle data) { int icon = R.drawable.launcher; long when = System.currentTimeMillis(); NotificationManager nm = (NotificationManager) coNtext.getSystemService(Context.NOTIFICATION_SERVICE); Intent ni = new Intent(coNtext, MainActivity.class); ni.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent

GcmPubSub subscribe Invalid appInstanceToken:

我只是一个虾纸丫 提交于 2019-12-13 04:49:59
问题 i'm recently tried new TOPICs API of Google Cloud Messaging Service. but i always got the error Invalid appInstanceToken: here is the logcat java.lang.IllegalArgumentException: Invalid appInstanceToken: 11-10 22:28:34.674 15742-15983/com.SimDetail W/System.err: at com.google.android.gms.gcm.GcmPubSub.subscribe(Unknown Source) 11-10 22:28:34.674 15742-15983/com.SimDetail W/System.err: at com.SimDetail.MainActivity$3.doInBackground(MainActivity.java:265) 11-10 22:28:34.674 15742-15983/com

How do I make requests from an Android app to an App Engine backend?

霸气de小男生 提交于 2019-12-13 04:46:01
问题 What I'm trying to do is have an Android app that connects to a Google App Engine backend in order to get data from a database stored in the cloud. I've looked up some documentation and figured that Google Cloud Messaging is the best way for this. I'm stuck on trying to integrate Google App Engine with the Android app. 回答1: GCM is great for sending small messages from GAE to the app, and particularly for waking the app and getting a message to it even if it isn't running. Sending a request

Send message from Server to Android device and vice versa

China☆狼群 提交于 2019-12-13 04:41:53
问题 I want to implement a chat application. But I have a few questions, which I could not solve by searching the internet. My requests are: Of course I can address each device individually from my server (makes sense for a chat app) I can create a time delay between sending and receiving a message The application should not require a registration (this is not a MUST, but would be nice) I wonder if GCM (Google Cloud Messaging) is the appropriate solution for me. I have not yet worked with it, so I

Persistance of gcm registration id

☆樱花仙子☆ 提交于 2019-12-13 04:40:57
问题 I am doing an android application which uses gcm.I came to know that when the application is uninstalled and re installed there is no guarantee to receive the same registration id again.So what I did is while logging in I take one unique Id from application server and whenever new registration id is made I am able to replace that in application server.So what my question is, I am not using the canonical id for replacing the latest registration id in gcm server.Will it cause any problem?

Access denied from curl on remoter server

霸气de小男生 提交于 2019-12-13 04:38:31
问题 I'm working on push notification service for android and followed some tutorial for that. I tried to implement the technique in localhost and succeeded. But While I tried with my remote server it is giving me the error "Curl failed: Failed to connect to : Permission denied". I don't know whats the problem with it. I tried looking for solution, but non of them worked. Here is the step how I did. I created a database called GCM for cloud messaging Added the following line of code in publish

how to resolve Android gcm notifications duplicate messages

巧了我就是萌 提交于 2019-12-13 04:32:49
问题 Hi am getting duplicate notification from gcm server , how to resolve it public class RegisterActivity{ private GoogleCloudMessaging gcm; Context context; String regId; private static final String REG_ID = "regId"; private static final String APP_VERSION = "appVersion"; static final String TAG = "Register Activity"; private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 9000; private GCMRegistrationCallBack registeredActivity; private Error error; public void registerGCM(Context _context