google-cloud-messaging

GCM and id handling

拥有回忆 提交于 2019-12-18 05:18:48
问题 I'm creating an app which uses Facebook and GCM. A user can use the app on multiple devices, a friend can send him GCM messages using his facebook id. On my server, I have a table which maps the facebook id to a gcm id. The table does not require the facebook id to be unique, so messages can be sent to multiple devices. In the docs, it demonstrates the following way to handle errors when sending a message: if (result.getMessageId() != null) { String canonicalRegId = result

GCM: Send notifications only for the current user logged in application

南笙酒味 提交于 2019-12-18 04:57:05
问题 For the application that I am working I need to integrate Google Cloud Messaging. After playing a little with different examples, I was able to send and receive a notification on my deivce. However, I have come across an interesting situation. As I know (please correct me if I'm wrong), the registration_id is issued per device and per application. The application that I'm working supports login functionality. When the application is installed and the user logs in for the first time (let it be

Google Cloud Messaging HTTP Error 400: Bad Request

ぐ巨炮叔叔 提交于 2019-12-18 04:42:25
问题 I am trying to send a message through GCM (Google Cloud Messaging). I have registered through Google APIs, I can send a regID to my website (which is a Google App Engine Backend) from multiple Android test phones. However, I can't send anything to GCM from Google App Engine. Here is what I am trying to use. regId = "APA91b..." json_data = {"collapse_key" : "Food-Promo", "data" : { "Category" : "FOOD", "Type": "VEG", }, "registration_ids": [regId], } url = 'https://android.googleapis.com/gcm

google-services.json location in the project tree

本小妞迷上赌 提交于 2019-12-18 04:33:05
问题 I am following this manual and I am unsure where I should exactly copy the file google-services.json ? There's many folders containing an app folder and I am trying to develop this for android wear . Any guide would be really great. So far I have put it here: Link to tutorial 回答1: Was configuring Firebase for android app and it gives good description on these. As the accepted answer says i t should goes in app folder . Adding images for better understanding of place to put it in and

Failed to resolve Intent Service Android

£可爱£侵袭症+ 提交于 2019-12-18 04:20:44
问题 I am getting following error when trying to configure Push Notification: 06-07 01:05:59.735 18708-18708/com.ebr.apps.ebr.development E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement 06-07 01:05:59.735 18708-18708/com.ebr.apps.ebr.development E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found. I have different flavors in gradle: My code package name is : com.ebr.apps.ebr My product flavor package is: com.ebr.apps.ebr

GCM register didnot work on my emulator

只谈情不闲聊 提交于 2019-12-18 03:58:39
问题 I had use GCM service on my app , I did my code after more resarches also from stack overflow members , and when I try to test the code on my emulator I didn't find any regiser info that tell me that my emulator is registered .Also I created my account on Google API to recienve any reports but I didn't find any thing. So I need your help on: 1- please check my code and till my when the error I will feedback you with complete example : <manifest xmlns:android="http://schemas.android.com/apk

Add gcm.jar in Eclipse IDE (Google Cloud Messaging)

◇◆丶佛笑我妖孽 提交于 2019-12-18 03:17:20
问题 I have a problem as: I didn't find where can I get this Jar file gcm.jar? also where Can I put it ?. Note I used Android 4.1. 回答1: Start SDK Manager and scroll down to the section "Extras" and make sure you have installed Google Cloud Messaging for Android Library , if not, install the package. The package will be installed in the directory " your-android-sdk\extras\google\gcm\ " Client code (for example to be used in Android app): gcm\gcm-client\ Server code (where the Client connects to and

Android GCM turn on Lights

[亡魂溺海] 提交于 2019-12-18 03:01:53
问题 I'm doing a project in Android. I can successfully receive push notifications. How to turn on the lights when I receive the push notification? And also I need to vibrate my mobile when receiving the push notification. 回答1: For More Information refer this Link. Add permission to your manifest file <uses-permission android:name="android.permission.VIBRATE"></uses-permission> EDIT // 1. Get a reference to the NotificationManager String ns = Context.NOTIFICATION_SERVICE; NotificationManager

What are consequences of having GCM SENDER ID being exposed?

限于喜欢 提交于 2019-12-18 00:04:44
问题 Scenario: Suppose by reverse engineering a .apk file, an attacker obtains the SENDER ID for Push Registration Service used in an App. The attacker develops a similar fake application which has same/different package name and has been uploaded on a different app store than Google Play. My question: Can he/she use the same SENDER ID with the app? What are the implications of that for the user who installs that fake application? Related Questions: google cloud messaging security question seems

Firebase when receive Push Notification did not receive the popup

99封情书 提交于 2019-12-17 22:49:48
问题 import Firebase import FirebaseInstanceID import FirebaseMessaging func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { registerForPushNotifications(application) FIRApp.configure() // Add observer for InstanceID token refresh callback. NSNotificationCenter .defaultCenter() .addObserver(self, selector: #selector(AppDelegate.tokenRefreshNotificaiton), name: kFIRInstanceIDTokenRefreshNotification, object: nil) // Override