Questions tagged [google-cloud-messaging]
Google Cloud Messaging is a service to allow data to be sent remotely to Android and iOS applications and Chrome extensions and packaged apps.
google-cloud-messaging
7,305
questions
575
votes
29
answers
198k
views
google-services.json for different productFlavors
Update: GCM is deprecated, use FCM
I'm implementing the new Google Cloud Messaging following the guides from the Google Developers page here
I've successfully run and test it. But my problem now is ...
246
votes
15
answers
111k
views
Error:Conflict with dependency 'com.google.code.findbugs:jsr305'
I created a new project in Android Studio 2.2 Preview 1 with Android App and Backend module with Google Messaging. This is the app file:
apply plugin: 'com.android.application'
android {
...
233
votes
10
answers
246k
views
How to send push notification to web browser?
I have been reading for past few hours about Push Notification API and Web Notification API. I also discovered that Google & Apple gives push notification service for free via GCM and APNS ...
218
votes
13
answers
198k
views
GCM with PHP (Google Cloud Messaging)
Update: GCM is deprecated, use FCM
How can I integrate the new Google Cloud Messaging in a PHP backend?
209
votes
11
answers
197k
views
Firebase messaging, where to get Server Key?
Firebase allows us to send notification messages via our own application by making POST request.
This tutorial, gives to us instructions how to make this request. However, there is Authorization ...
202
votes
25
answers
110k
views
Use different GoogleService-Info.plist for different build schemes
I am using a build scheme for prod and one for staging (with 2 different bundle identifiers) and I am trying to use a separate GoogleService-Info.plist for each scheme.
Is there any way to manually ...
198
votes
13
answers
293k
views
Where can I find the API KEY for Firebase Cloud Messaging?
I am trying to figure out how the new version of GCM or Firebase Cloud Messaging works so I moved one of my projects to the new Firebase console, If I did not have the API KEY or I want to create a ...
190
votes
25
answers
150k
views
INSTALL_FAILED_DUPLICATE_PERMISSION... C2D_MESSAGE
I am using Google notifications in my app, and until now I have done below in the manifest:
<!-- GCM -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <!-- GCM ...
179
votes
11
answers
122k
views
Google Play Services GCM 9.2.0 asks to "update" back to 9.0.0
So this morning I started updating to the latest version of my project libraries.
I'm trying to update GCM to the latest version 9.2.0, but I get this error:
Error:Execution failed for task ':app:...
134
votes
3
answers
56k
views
What does google-services.json really do?
I work on adding Google Analytics and GCM services to my current app.
On the guide for both services implementation, google asks developer to generate a json file: google-services.json and put it ...
112
votes
6
answers
89k
views
Adding HttpClient headers generates a FormatException with some values
This occurred within the context of coding against Google Cloud Messaging, but applies elsewhere.
Consider the following:
var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new ...
106
votes
8
answers
73k
views
FCM with AWS SNS
I am using AWS resources for my android project, I am planning to add push notification service for my project with AWS SNS.there are few questions bothering me much. I did not find any questions ...
99
votes
4
answers
118k
views
Android: Test Push Notification online (Google Cloud Messaging) [closed]
Update: GCM is deprecated, use FCM
I am implementing Google Cloud Messaging in my application. Server code is not ready yet and in my environment due to some firewall restrictions I can not deploy a ...
98
votes
26
answers
221k
views
Firebase cloud messaging notification not received by device
I am having an issue with FireBase Cloud Messaging in which I get the Token from the device and send the notification test through the Google Firebase notification console however, the notification is ...
88
votes
7
answers
128k
views
Is Firebase Cloud Messaging free?
I need to implement push notification feature in my application. Exploring some options.
Google recently recommends Firebase platform, but this is not completely a free service. So I thought of using ...
87
votes
10
answers
112k
views
AWS SDK for PHP: Error retrieving credentials from the instance profile metadata server
I am trying to send SNS messeges to android through web api.
Downloaded and installed the SDK from http://aws.amazon.com/developers/getting-started/php/
Got following error while running sample.php:
...
84
votes
10
answers
94k
views
Android GCM SENDER_ID, how to get it?
I try to migrate to GCM and I have an issue with the SENDER_ID I need to provide. I use the demo project from google. In this project I need, if I understand this well, to provide a SENDER_ID to the ...
82
votes
16
answers
51k
views
IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM
Since I updated to Android SDK Tools 25.1.6 and Android Support Repository 32.0.0 (this morning), I got the following error, I didn't change anything in my code and it is still working on my colleague ...
80
votes
3
answers
57k
views
Handling registration ID changes in Google Cloud Messaging on Android
In the docs on Google Cloud Messaging, it states:
The Android application should store this ID for later use (for
instance, to check on onCreate() if it is already registered). Note
that Google ...
77
votes
11
answers
151k
views
Why do I get "MismatchSenderId" from GCM server side?
I'm trying to create a push service for my Android app, and I follow Google GCM's documentation and example for this matter:
I can register/unregister my Android app. From my server side, I can see ...
75
votes
4
answers
89k
views
How To Create Topic in FCM Notifications
I'm trying Firebase-Notification API the service is worked perfect when i send downstream message from console to app, but how to send message to topic registered users ?
i did in android side
...
74
votes
9
answers
92k
views
Android Push Notification (GCM), is there any Daily Limit?
Is there any daily limit for number push notifications (GCM) can be sent to a particular android application user?
73
votes
9
answers
92k
views
Load image from URL in notification Android
In my Android application, I want to set Notification icons dynamically which will be loaded from URL. For that, I have used the setLargeIcon property of NotificationBuilder in receiver.
I referred to ...
72
votes
2
answers
50k
views
com.google.android.gsf package couldn't be found
I am trying to use new Google Cloud Messaging system but I have some problems.
I read Getting Started document and reviewed demo app; after that I applied requirements to my application then I ...
67
votes
4
answers
44k
views
java.lang.RuntimeException: WakeLock under-locked C2DM_LIB
I have uploaded my application on google play but users have reported the following exception
java.lang.RuntimeException: WakeLock under-locked C2DM_LIB. This exception occurs when I try to release ...
66
votes
4
answers
55k
views
Is GCM (now FCM) free for any limit? [closed]
I would like to know if Firebase Cloud Messaging is free or not for unlimited users?
64
votes
1
answer
18k
views
Push Notifications or Socket.io?, or Both?
I'm developing a chat system for web, Android and iOS. Doing my research I've found differences on how GCM and APNS handle the Push Notifications.
If I send a Push Notification to a Android Device ...
63
votes
1
answer
62k
views
Push notifications (GCM) permission at runtime?
I have read that it is necessary to ask the user for some permissions at runtime for API 23 and up. For example: android.permission.ACCESS_FINE_LOCATION.
Is it necessary (or even possible) to ask for ...
58
votes
5
answers
95k
views
Getting an API key to use with Google Cloud Messaging
I am developing an Android app and I'd like to start testing out push notifications. From a code perspective, I'm all set. My current challenge is that I simply do not know how to get a Google Cloud ...
58
votes
6
answers
91k
views
Android emulator not receiving push notifications
I'm using push notifications on google cloud, however for some reason i cant receive push notifications on the emulator.
The same application does receive notifications when i test it on a real ...
55
votes
6
answers
9k
views
Weird push message received on app start
I'm getting a weird push message captured by my push service:
Bundle[{CMD=RST_FULL, from=google.com/iid, android.support.content.wakelockid=1}]
Just started to happen yesterday and I can't really ...
53
votes
1
answer
2k
views
Intermittent 401 Unauthorized from Google GCM
We are getting intermittent 401 Unauthorized errors from Google's GCM service. In the past, it worked 100% of the time. The problem might coincide with our routers accepting IPv6 traffic, but the ...
52
votes
7
answers
38k
views
Refreshing activity on receiving gcm push notification
Update: GCM is deprecated, use FCM
How to refresh activity on receiving gcm push notification if my app is open. I have an activity which contains listview filled with data from the server. I want to ...
52
votes
6
answers
24k
views
Firebase token error TOO_MANY_REGISTRATIONS
After reading 100's of threads and googling I am still confused about this following error message.
Currently, I am using Firebase Cloud Messaging and in very short terms I am trying to get my token ...
51
votes
4
answers
40k
views
android GCM registration ID max length
In Google Cloud Messaging, what is exactly the registration ID maximum length?
48
votes
3
answers
32k
views
GCM - Max length for Registration ID
Update: GCM is deprecated, use FCM
What is the maximum length for a Registration ID issued by GCM servers? GCM documentation do not provide this info. Googling for this reveals that Registration ID ...
46
votes
6
answers
43k
views
GET_ACCOUNTS permission while using GCM - Why is this needed?
I have an app, with Push notifications implemented.
I want to understand the reason why we need "GET_ACCOUNTS"(android.permission.GET_ACCOUNTS), while implementing GCM? Some users are raising ...
45
votes
5
answers
32k
views
Migration from GCM to FCM needed?
Google just announced that Google Cloud Messaging is now Firebase Cloud Messaging. What does this mean for existing users of GCM and what migration (if any) are needed?
45
votes
3
answers
83k
views
Firebase FCM Usage Limits [closed]
I was wondering if there is a comprehensive list that privides details of the various Firebase FCM usage limits.
I knew of the Data message payload limit of 4KB maximum.
and then recently I got some ...
44
votes
2
answers
37k
views
Do GCM registration id's expire?
I know that C2DM registrations expire, and you are supposed to periodically refresh the registration ID. Is this the case with GCM? by looking at the following code on the Android GCM guide (shown ...
43
votes
4
answers
37k
views
GCM Error=MissingRegistration sending messages via JSON
I'm testing push GCM via Fiddler
Headers:
User-Agent: Fiddler
Authorization: key=AIzaSyAkXfcuLLCZ-5n18wwO6XeJ13g-z9ja
Host: android.googleapis.com
Content-Length: 286
Body:
{"registration_ids":["...
43
votes
1
answer
15k
views
Android GCM: same sender id for more application
Is it possible to use same sender id for more applications? Now I have 18 application (different language and some functionality) which use same backend. Now I am implementing push notifications with ...
43
votes
10
answers
21k
views
Error broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.flagg327.guicomaipu (has extras) }
I'm receiving that error from Android Studio's Android Monitor. This error appears when I send a push notification through GCM, in a real device, and the app has not been started yet or has been ...
42
votes
2
answers
79k
views
How to send notification to specific users with FCM?
I prepared the receiver for FCM and can send a notification to all devices.
gcm-http.googleapis.com/gcm/send with this link can send to target users who is registered and post to the target devices ...
41
votes
8
answers
56k
views
GCM 'Error : Not Registered'
I succeed in testing My GCM code.
But exactly same code, I couldn't get GCM push and got:
GCM Error : Not Registered.
41
votes
4
answers
45k
views
Android NotificationManager giving me "no valid small icon" error
I am having a strange error with notification manager.
@Override
public void onMessageReceived(String from, Bundle data)
{
Log.i(TAG, "IP : " + (String) data.get("ip"));
NotificationManager ...
40
votes
5
answers
18k
views
Google Cloud Messaging - messages sometimes not received until network state changed
While working on a little project that integrates with GCM, I've stumbled across a bit of a strange issue.
Some times when I start watching the log to see if messages are received, messages do not ...
40
votes
4
answers
28k
views
Xiaomi does not receive a notification when the application is not running
I am working on an application where I am using Google Push Notification. The application receives a notification when it is running in Xiaomi phone. Otherwise, when it's killed, it does not receive a ...
39
votes
6
answers
44k
views
FCM background notifications not working in iOS
I have a problem with FCM notification on iOS.
I receive notifications with success when my app is in foreground (the callback didReceiveRemoteNotification in appdelegate is fired), but I don't ...
39
votes
6
answers
97k
views
Send push notifications from server with FCM
Recently I asked a question on sending push notifications using GCM: Send push notifications to Android. Now that there is FCM, I am wondering how different it would be from the server side ...