google-cloud-messaging

ANDROID - FATAL EXCEPTION: IntentService[] [..] java.lang.IncompatibleClassChangeError [..]

ぐ巨炮叔叔 提交于 2019-12-12 04:25:55
问题 I try send notification for my application with Google Cloud Message. I created a new project and I implemented the code and this work fine. but when i try implement in my application, the application show this error message: ERROR MESSAGE: 08-07 14:48:57.735 324-1057/br.com.pkg.project E/AndroidRuntime: FATAL EXCEPTION: IntentService[] Process: br.com.pkg.project, PID: 324 java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat

Firebase: Can I detect if a Server API key is FCM or GCM?

淺唱寂寞╮ 提交于 2019-12-12 04:23:32
问题 I have a mix of GCM and FCM Server API keys that belong to different android apps. However I am not the owner of the apps and do not have direct access to the google developer console. Is there a way to detect whether a Cloud Messaging Server API key is enabled for Firebase? I would like to know this so that I can notify the owners of the GCM server keys to update to Firebase. Thanks -David 回答1: There is no way to tell if a Server Key used in the request is from a GCM/FCM enabled project.

Do we need complex sending strategies for GCM / FCM?

a 夏天 提交于 2019-12-12 04:22:38
问题 Currently I'm working on a SaaS with support for multiple tenants that can enable push notifications for their user-bases. I'm thinking of using a message queue to store all pushes and send them with a separate service. That new service would need to read from the queue and send the push notifications. My question now is: Do I need to come up with a complex sending strategy? I know that with GCM has a limit of 1000 devices per request, so this needs to be considered. I also can't wait for x

Notification not showing up using Android Auto

一世执手 提交于 2019-12-12 04:17:21
问题 I followed the tutorial on Udacity and the developer site for Android auto. I am using a DVU for testing. The notifications don't show up on the DHU but appears on the phone here is my code: Using GcmListenerService: final PendingIntent contentIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT); final PendingIntent contentIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT); Intent

How to send one-to-one upstream messaging using not not using FCM without hosting a server?

孤街醉人 提交于 2019-12-12 03:48:25
问题 Sending messages from one device directly to another device it not supported through Firebase Cloud Messaging. -- Frank van Pufflenen - JUNE 23 2016 That was quite some time ago, and there aren't any updates in the docs. However: Has there been any changes? Is Firebase the only option? Are there any other app servers (Like Firebase and the shut-down Parse )? I don't want to find/buy a server just for this. But is the Firebase Server SDK suitable for this? Can this be implemented using GCM?

Android notification push empty using GCM and java with json message

家住魔仙堡 提交于 2019-12-12 03:48:24
问题 I'm struggling to push notifications to Android devices. Here is a small piece of code I wrote: String API_KEY = "AIzaSy...."; String url = "https://android.googleapis.com/gcm/send"; String to = "ce0kUrW..."; String data = "{\"to\": \"" + to + "\"}"; RequestBody body = RequestBody.create(MediaType.parse("application/json"), data); OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder().url(url).post(body).addHeader("Authorization", "key=" + API_KEY).build(); Response

Will push notifications through GCM be supported in eclipse

烂漫一生 提交于 2019-12-12 03:46:31
问题 I am using eclipse IDE for development. I followed lots of tutorials and implemented push notifications in my project but I'm not getting the GCM Registration id, So my questions is: will eclipse support the push notifications or not? Below is the code snippet; if you need more clarity please comment below. registerReceiver(mHandleMessageReceiver, new IntentFilter(DISPLAY_MESSAGE_ACTION)); Log.v("testing", "testing"); // Get GCM registration id final String regId = GCMRegistrar

High Server CPU after sending GCM

我的梦境 提交于 2019-12-12 03:35:54
问题 I have a little problem with my server and Google Cloud Messaging. I've recently launched an application that sends push notifications each time we publish new posts (1 each 30 minutes). It use /topics/global , so I don't keep in the client registration in memory. The problem is that when server sends notifications (trough CURL, PHP or Shell) the server CPU goes high and other operations slow down. This has happened for some days, maybe because we have more than 4,000 smart phones with the

GCM API Key confusion

和自甴很熟 提交于 2019-12-12 03:34:06
问题 I want to use GCM for my project and so i create a project at google console and wanted to add an api key. Now i have different options: Server Key Browser Key Android Key iOS Key What i actually want to do is sending GCM Messages from my Apache Server using PHP to my Android devices. So which kind of key do i need now? The Server Key? The Browser Key or the Android Key? I know that all i need at my Android Client side is the SENDER_ID which is the id of my project. I just need the API key

Android - Sending Push Notifications via GCM with app in foreground/background

痴心易碎 提交于 2019-12-12 03:33:11
问题 I'm adding Push Notifications via GCM to my app, but I am stuck on something. When I send a Push Notification with my app on foreground (open and on screen), it displays normally, as intended: But when I send it with my app on background, it displays like this: So my large image and icon background color doesn't display. Code for GCM HTTP Call: { "notification": { "title": "Tecolutla, Veracruz", "body": "¡Bienvenidos a Tecolutla!", "icon": "push" }, "priority": "high", "data": { "Mensaje":