google-cloud-messaging

Two Push Notification services in android

给你一囗甜甜゛ 提交于 2019-12-23 12:47:05
问题 I have integrated Parse SDK with my project already and implemented Parse Push Notification and its working perfectly. But the Problem is: When I integrate another Push Service in my project, the parse Push Stops working? Note: 1.Parse uses its own push service. 2.The new Push I tried to use use GCM push service. Is there any clash between them or is there any way we can manage both? 回答1: When you use two Gcm clients with Gcm broadcast receiver in your own project - the last broadcast

IP address for Google Cloud Messaging server

风格不统一 提交于 2019-12-23 12:27:09
问题 I'm about to roll out an implementation of GCM on a server and need to open the appropriate firewalls by IP. Does anyone know where I can find the IP address range for android.googleapis.com ? Thanks! 回答1: I have found that the IP ranges for android.googleapis.com are not published. 回答2: According to https://developers.google.com/cloud-messaging/http: GCM doesn't provide specific IPs, so you should allow your firewall to accept outgoing connections to all IP addresses contained in the IP

Google PubSub error [code=8a75]

雨燕双飞 提交于 2019-12-23 12:20:14
问题 Today, I started getting this error sporadically. Google pubsub error codes talks about only HTTP error codes. Does anyone know about this error? ERROR Error: The service was unable to fulfill your request. Please try again. [code=8a75] 回答1: This error code is retryable, and can be safely expected. Automating your code to automatically retry with backoff, or to use one of the official client libraries, which automatically retry on these errors with backoff is the recommended solution. In

Firebase API call with multiple topics in condition

拜拜、爱过 提交于 2019-12-23 11:56:50
问题 I am facing a tragic issue while calling FCM API:- In brief When I am calling the API with following: URL:-https://fcm.googleapis.com/fcm/send Content-Type:application/json Authorization:key=AAAA4Kkj8iw:APA91bE......vE4Hxg { "condition" : "'Software' in topics", "data":{ "title":"Title", "message":"Hello,Via Multiple Topics" } } It works Fine and I got the notification on device from which I have subscribed to topic "Software", But when I go for multiple topics and change the body to {

Using GCM in android studio

烂漫一生 提交于 2019-12-23 09:12:40
问题 I don't know how to get GCM working in my project in android studio. When I use some of the clases of GCM, y get this: Can't resolve symbol GCMRegistrar In this code: GCMRegistrar.checkDevice(this); And it does not show the option to import the class. This is my graddle file: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.8.0' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 19 buildToolsVersion

Firebase notifications in the foreground

别说谁变了你拦得住时间么 提交于 2019-12-23 08:50:38
问题 I am having problem with FireBase push notifications. When my app is in the background, notifications are coming, but when my app is in the foreground i don't receive notifications, but in console that notification is displayed, that means that notification is here but it doesn't show in notification bar . Could you help me? @Override public void onMessageReceived(RemoteMessage remoteMessage) { Log.d("OnMessage", "Received"); super.onMessageReceived(remoteMessage); Log.d(TAG, "From " +

GCM stop working after some time

自作多情 提交于 2019-12-23 07:49:03
问题 I'm using GCM service in my app. It is working fine, however some time it stops receiving GCM notifications. I have to restart the device. Is there any way to avoid this? 回答1: This a known problem with some wifi routers and mobile carriers, it's basically a tcp timeout problem and actually solution is implement a heartbeat service that send to clients every 5 mins. This a opened issue to google here: https://productforums.google.com/forum/#!category-topic/nexus/connecting-to-networks-and

class not found exception GCMIntentServices on path DexPathList

独自空忆成欢 提交于 2019-12-23 06:04:03
问题 i have checked most of the available material on GcmIntentServices but couldn't figure out the problem i am facing.. The Push notification code is provided on the login page and the next page is homeScreen, but the intent occurs without fail.. yet after some time on the home page.. the app crashes.. my log cat provides the following error.. E/AndroidRuntime(1449): FATAL EXCEPTION: main E/AndroidRuntime(1449): Process: com.example.smss, PID: 1449 E/AndroidRuntime(1449): java.lang

GCM Regisration Id expiration time

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 05:25:30
问题 I'm struggling with the next issue about GCM. I read the document (GCM document) and saw the example by Google how to implement the GCM client within Android app but in the entire document there is no reference to expiration of Registration Id. I saw that question but the example there is not following the last update by Google to the GCM Demo App My questions are: Does a Regisration Id ever expire? If a Regisration Id expires, how can I know that (is there any event for that)? Thanks in

GCM Notification onclick does not open specified activity

南笙酒味 提交于 2019-12-23 04:56:33
问题 None of previoues asked questions solve my problem unfortunately. My application insists to does not open specified activity. Instead it opens main activity which is GCMService.java private void sendNotification(String message) { Intent intent = new Intent(this, LaunchActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 , intent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG