FAQ Database Discussion Community


multiple notificaition in gcm meteor

javascript,node.js,meteor,push-notification,android-gcm
I have a simple query. I am implementing GCM notification in my application developed in meteor. The code goes as follows var gcm = Meteor.npmRequire('node-gcm'); var sender = new gcm.Sender('MY_ID'); var message = new gcm.Message(); //message.addData('message',new Date().getTime()); message.addData({'title':'mytitle','message':new Date().getTime()}); message.delay_while_idle = true; var registrationIds = []; registrationIds.push("MY_REG_NO"); sender.send(message, registrationIds, 4,...

How to send GCM notification using pure python 2.6

python,post,curl,android-gcm
I'm trying to write a simple script which should check GCM registration_ids in other word a try to recreate cURL request curl -i -X POST \ -H "Authorization:key=auth_key" \ -H "Content-Type:application/json" \ -d '{"registration_ids": ["reg_key"], "data": {"test": "test"}}' \ 'https://android.googleapis.com/gcm/send' in pure python this is my code conn = httplib.HTTPSConnection("android.googleapis.com")...

Duplicate Google cloud message account registered when app re-install

android,android-gcm,messaging,messages,amazon-sns
I am working on integrate GCM to the android app, my working flow is first whenever the user enter the app, it check whether the share pref. has the gcm id, if not , then reg and save to share pref. The problem is, it seems the id is duplicate...

Creating a mysql database with regID's

java,php,android,mysql,android-gcm
I am implementing Push notifications for my app at the moment. As you know, every user has to register via a certain regID which is stored on the server. I hav been following this tutorial. ( I have used mainly it's code for the server setup aswell) The problem is,...

Why I can't receive messages from GCM on android device

php,android,android-gcm
I am creating an android application where I need to send gcm messages. So far I managed to get device id and to sent it to my server. Now when I'm trying to push a message from my server to my app, I receive this message : {"multicast_id":4987023356709284342,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1430085972465424%73c650e3f9fd7ecd"}]}, but nothing...

content or data limit for Android push notification (GCM)

php,android,push-notification,android-gcm,google-cloud-messaging
Is there any data limit for android push notification GCM using php. I passed data (message) through this code. $url = 'https://android.googleapis.com/gcm/send'; $fields = array ( registration_ids' => $registatoin_ids, data => $message, ); $headers = array( Authorization: key= . GOOGLE_API_KEY, Content-Type: application/json ); // Open connection if(!function_exists('curl_init')) echo "CURL not...

Permission denial : broadcasting intent android?

android,google-analytics,broadcastreceiver,android-gcm
I am getting this following error Permission Denial: broadcasting Intent { act=com.android.vending.INSTALL_REFERRER flg=0x10 cmp=com.app/.MyBroadcastReceiver (has extras) } from null (pid=1853, uid=2000) requires com.google.android.c2dm.permission.SEND due to receiver com.app/.MyBroadcastReceiver In my app I have google analytic implementation and GCM implementation. This is receiver declaration <receiver android:name="com.app.MyBroadcastReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND" >...

GCM XMPP Server using Smack 4.1.0

xmpp,android-gcm,server,smack
I'm trying to adapt the example provided here for Smack 4.1.0. and getting a little confused. Specifically I'm struggling to understand what the GcmPacketExtension should now extend, how the constructor should work and how the Providermanager.addExtensionProvider should be updated to tie in with it. I'm sure someone must have done...

Gson Exception Expecting object found

java,gson,android-gcm
I am using the gSON API 1.7.1 sometimes having following error. Is there a bug for this version? Do I need to upgrade the current version 2.x.x com.google.gson.JsonParseException: Expecting object found: "<!DOCTYPE" at com.google.gson.JsonObjectDeserializationVisitor.visitFieldUsingCustomHandler(JsonObjectDeserializationVisitor.java:100) at com.google.gson.ReflectingFieldNavigator.visitFieldsReflectively(ReflectingFieldNavigator.java:63) at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:120) at...

Laravel 5.1, Return response to user, then excute some code [closed]

php,android,laravel,android-gcm,laravel-5
The Story I am using NotificationPusher that uses GCM to send notification to user. It takes some time to connect to google server and wait for response. So, I don't want my user to wait until notification is sent, I want him to get the response (say that he successfully...

What technology does GCM (Google Cloud Messaging) use?

android,sockets,http,android-gcm,comet
Does it work by polling the servers periodically ? Does it work using long-held http request , like comet ? Or theres some new technology they are using ?

Server side GCM returns error 400

java,android,json,android-gcm
I am tring to implement GCM. I wrote a test code to understand how it works, but I keep getting error 400 in the response. I'm writing in Java (JDK 7). I followed this toturial on the subject. I modified the given code there, and changed the use of ObjectMapper...

How to send android push notification without ssl certificate

java,android,java-ee,android-gcm,server
I am using only http service and I dont want to pay SSL certificate and don't use self signed certificate. there is any other way to get send push notification in my app clients. Thanks in advance.

ssl handshake exception in android gcm server

java,android,ssl,android-gcm
Hi friends I am new to android. I am trying to create gcm server. my code is System.setProperty("javax.net.ssl.trustStore","/usr/bin/keystore.jks"); String id = "cliend id"; String msg = "Test"; Sender sender = new Sender(Api key); Message message = new Message.Builder() .addData("message", "this is the message") .addData("other-parameter", "some value") .build(); Result result; result...

GCMBroadcastReceiver not called

android,broadcastreceiver,android-gcm
My GCMBroadcastReceiver is never called. I sent a message from my server via php to GCM, I got this from GCM, so my server side should be working: {"multicast_id":XXX,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"XXXX"}]} So the problem has to be in my AndroidManifest, but I can't find the solution, can you guys help me? AndroidManifest.xml...

GCM device registered successfully but on server no devices registered yet

php,android,mysql,push-notification,android-gcm
I have implemented the code for sending push notification using gcm. On my device I get the message "device successfully registered with gcm" but on the server it displays "No devices registered yet". Also I don't receive any notification on registration which according to the tutorial should be received. here's...

Subsequent(ie. AFTER FIrst) notification pendingintent not launching activity when app is initailly closed

android,notifications,broadcastreceiver,android-gcm,android-pendingintent
Scenario 1 - App is open, receive pendingintent in notification and when notification is clicked, opens activity with new content, every pendingintent notification received after the first works in a similar fashion . Scenario 2 - App is closed (not running), receive pendingintent in notification and when notification is clicked,...

Android push notification message not being displayed

android,notifications,android-gcm
I'm working with push notifications and I'm having trouble to understand a bug that I recently discovered. I receive push messages just fine on Galaxy S4 Mini, Nexus 4, Galaxy Note 2, MOTO E and MOTO G. But on Galaxy S5, I receive the push notification, I can see the...

Urban Airship / Parse vs rolling out your own solution for push notifications

push-notification,apple-push-notifications,android-gcm
What are the pros/cons of using UA/Parse vs your own solution. I'm not trying to set off a comparison, what I'd like to know is what benefit would you have in using their services (which costs money) vs rolling out your own solution with the various APIs (which costs nothing...

Loading closed app from pendingintent using a broadcast receiver

android,notifications,broadcastreceiver,android-gcm,android-pendingintent
I am creating a chat app using GCM. The app starts at MainActivity, user enters there username and I register the user, save gcm info(name & device id) on web server and in SharedPreferences and then I load the list of users in MainActivity. I click a user in list,...

Android - not getting GCM token

android,android-gcm
I call RegistrationIntentService: if (checkPlayServices()) { Log.i("udazzT", "check servicies"); // Start IntentService to register this application with GCM. Intent intent2 = new Intent(this, RegistrationIntentService.class); startService(intent2); } But I cannot see any of the logs in RegistrationIntentService: public class RegistrationIntentService extends IntentService { private static final String TAG = "RegIntentService"; private...

GCM showing error Request Entity Too Large Error 413

php,android,android-gcm
I have a table with more than 50000 googleID. I try push notification with GCM and PHP but it showing error "Request Entity Too Large Error 413". How to fix it? Thanks!

Google PubSub and GCM

android-gcm,publish-subscribe
My project has a requirement of pushing notifications to android mobile phones based on certain events. (I need a gcm) Users of the mobile phones can subscribe to these events and hence I need a pub/sub. Now, google pub/sub service can help me build the pub sub but it can...

Remove message from GCM

php,android,android-gcm,google-cloud-messaging
I have an application, where the users logs in, gets a registration id from the GCM and send it to the server. My server will use that registration id and GCM to send notifications to the user. Now, I have the following situation: the user goes offline, the server sends...

GCM Checking for Delivery Failure when time_to_live = 0

android-gcm,google-cloud-messaging
Is there a way to determine if the delivery of a message failed when time_to_live = 0? According to the GCM reference, messages that have time_to_live = 0 are attempted to be delivered immediately, but are discarded on failure, rather than saved for future delivery. I was wondering if there...

PushSharp device registration in C#

c#,android,android-gcm,pushsharp
I'm new to pushsharp, I used GCM with php before and I know there is some method for registering the device. I used that method for holding all device IDs inside a table, but in PushSharp examples I didn't find this method or any equivalents for it, is there any...

Free library for chat in android? [closed]

android,sockets,android-gcm,chat
I want to implement a chat module in my existing app. I have found a way of doing it with GCM & socket programming But i want implement using a plugin or library. Is there any Free library available for android ?

Android Notification not shown

android,notifications,android-gcm,android-notifications,android-notification-bar
I wrote an IntentService for GCM Push Notifications. I receive the Messages but something's wrong with displaying my Notification to the user. Here's my Code: import com.google.android.gms.gcm.GoogleCloudMessaging; import android.app.IntentService; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.support.v4.app.NotificationCompat; import android.support.v4.app.TaskStackBuilder; import android.util.Log; public class GcmIntentService extends...

android: sending a push notification using GCM to all the devices instead of only 1000

android,notifications,android-gcm
Hi i'm developing a news android app, and i want to send a push notification to all the registered devices, but apparently Google said in their tutorials that you can send a push notification to up to 1000 users. but this is very frustrating and i know apps that send...

Cannot receive push notification from parse.com

android,parse.com,push-notification,android-gcm
I have implemented what parse.com had in their tutorial and when I send a push from parse dashboard it says Succeeded but the number of pushes sent is 0. However whenever I want to send the push it says recepient 1 which means it recognizes my device. I did what...

xmpp ruby client for google cloud messaging service

ruby,xmpp,android-gcm
I'm trying to write a xmpp implementation in Ruby for GCM CCS. My code require 'xmpp4r' sender_jid = Jabber::JID.new([email protected]') client = Jabber::Client.new(sender_jid) client.connect('gcm.googleapis.com', 5235) client.auth('auth_token') after client.connect .... I get this error : fatal: No live threads left. Deadlock? Any ideas?...

How to implement Back Off in Google Cloud Messaging Api when Service Not Available

android,android-gcm
I have used Google Cloud Messaging Api to implement GCM functionality but I need to fix Service Not Available error. For that I am using back off but I dont know after making the thread sleep.. How can I set register the device again. private void registerInBackground() { new AsyncTask<Void,...

How to handle tap of notification in Android if displayed automatically by GCM

android,push-notification,android-gcm
I faced 2 issues in Android with the latest update to GCM. As per GCM, it will automatically display notification in the tray if the payload contains 'notification' attribute. But they have not mentioned how to handle on tap event for that notification. If the payload contains only data attribute,...

Unknown provider: $ionicAppProvider

angularjs,android-gcm,ionic-framework
I get this error when I try to set GCM push's api key in app.js Here is the code I use: .config(['$ionicAppProvider', function($ionicAppProvider) { // Identify app $ionicAppProvider.identify({ // The App ID for the server app_id: 'MY_APP_ID', // The API key all services will use for this app api_key: 'MY_API_KEY',...

JPush works all over the world?

android,push-notification,android-gcm
I want to develop an android application that can receive push notifications. This app will be localised in multiple languages and should work in China as well. I know all google services are blocked in China. So, I cannot use GCM. I found some alternatives like JPush. Now the only...

Getting JSON Exception While connecting GCM through curl

android,json,curl,push-notification,android-gcm
I am getting an error when I make a curl request to GCM server: JSON_PARSING_ERROR: Unexpected character (m) at position 0 curl request: curl -i -H "Content-Type: application/json" -H "Authorization: key=AIzaSyAuKLBnVEv_bm4fp88RqKaVm8DClzc" -X POST -d "message":"Hi I am Developer","registration_ids":"["APA91bGj-wkz4m6tEaFfual2HuRHNAn3CmAE6nRmv5LaOnuWa_6D3AnacqTmSCHXiKvdzINVc_XUGJhrXk0z5hQomdCM_9Nf6QqB-Pf9Q6Tf_DraUZZaUVtDiaRaIStgXsx0zMFqKJHU0q75OGCtq5OSGR11l3mCB5DBtzvl4nFwOws_UuA"]" https://android.googleapis.com/gcm/send ...

What is the point of phonegap-build/PushPlugin? Doesn't the device OS handle receipt from GCM/APNs?

cordova,drupal,android-gcm,push,apn
What is the point of phonegap-build/PushPlugin? Doesn't the device OS handle receipt from GCM/APNs? I'm looking to use Drupal w/Push-Notifications Module to handle storing ids and forming requests to the GCM/APNs servers....

android app using GCM crash after running

android,eclipse,android-gcm
I am trying to create an app using GCM tech to push notifications, but the app crashes after running. here is my logfile ..I can't find the mistake: 05-11 20:04:55.758: I/dalvikvm(20069): DexOpt: access denied from Lcom/google/android/gms/common/GooglePlayServicesUtil; to field Landroid/app/Notification;.extras 05-11 20:04:55.758: W/dalvikvm(20069): VFY: unable to resolve instance field 12 05-11...

Problems implementing the new GCM Client for Android

java,android,eclipse,android-gcm,google-play-services
I'm trying to implement the new GCM Client on Android following the guidelines from Google (https://developers.google.com/cloud-messaging/android/client). I'm receiving slightly different errors for two different devices. I noticed that I receive NoSuchMethodError for method getNoBackupFilesDir for both the devices. This is the logcat for an Android 4.2.2: 06-08 09:01:09.920: I/dalvikvm(9138): Could...

ServiceWorker and Push Notification Payload

node.js,android-gcm,ecmascript-6,service-worker,chrome-gcm
Community: ServiceWorker is a great advance technology in terms of cache managment, but I have some questions associated with other operations such as: Push Notification: I made a GCM integration (Google Clud Message) and NodeJS, following this article, the problem is that when GCM sends the information to the client...

Manage GCM Registration ID in Server

android,android-gcm
I learn about GCM server today. Reading contents in developer.android.com section GCM, I still not sure how to manage registration ID in third party server. What I understand is: android app can register and unregister its ID from/to GCM server. Server side can send message into devices using registration ID...

Unnable to make Google Cloud Messaging Work

android-gcm
I followed the new tutorial Implementing GCM Client on Android, and I'm unnable to make it work. I get the token form my device succesfully, and when I send the following message { "to": "f19jCbaw-S4:APA91b....", "notification": { "body": "body", "title": "title" }, "data": { "message": "test" } } to https://gcm-http.googleapis.com/gcm/send,...

Google Cloud messaging service returning empty registration id

java,android,android-emulator,android-gcm,google-cloud-messaging
I'm running into an issue implementing Google Cloud Messaging. When i try to register my emulator i'm suppost to get the Registration ID of the device, which in this case is my emulator. So when i looked around i saw i needed to link a google account so i did...

GCM message(Or data ) limit

php,android-gcm
I have php code for sending push notification . It works for small data(message) but when i try to send large String in push notification its not working. Is there any limit on string to send in GCM ? if any what is size? Thanks in adavnce...

GoogleAuthUtil.getToken - No Value [Null Pointer Exception]

java,android,android-gcm,google-authentication
I'm attempting to use GoogleAuthUtil.getToken to generate a token that I can use to get A Notification Key . But one I run my app , it crashes. PS: I have already added the <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> to the Manifest File Here is my java code package com.javapapers.android; import...

Responding to Parse Push notifications with a custom response

android,parse.com,android-gcm
I'm developing an Android app and I wish to use Push notifications to perform a custom task without displaying a notification to the user. Specifically, the app is in alpha stage and I wish to be able to send a remote command to a specific device to restart a background...

How to use GCM Registration ID to send notifications

android,android-gcm
My team has been developing an app using GCM for the last 4 months, and today we discovered that with the recent update of Google Play Services GCM changed significantly. Until now we've been sending notifications from our backend server to our users using this format of Registration ID: APA91bF7h6vQkqIaF9ECQ_V............w...

GCM support for ios application when application in background or killed

ios,iphone,xcode,android-gcm
Hello all i am integrating GCM in iOS application using following link https://developers.google.com/cloud-messaging/ios/start. I have also uploaded the certificates when configuring the file on defined steps. I have also succeeded for getting notification,but the problem is that i am not getting the notification when the application is killed or in...

Does GCM requires Internet Connection?

android,android-gcm
Im using GCM to get Notifications for my Android App. When registering at GCM you have to call: @Override protected String doInBackground(Void... params) { String registrationID = ""; GoogleCloudMessaging gcmObject = null; try { gcmObject = GoogleCloudMessaging.getInstance(this.context); registrationID = gcmObject.register(Globals.GOOGLE_PROJECT_ID); } catch(IOException e) { registrationID = null; } return registrationID;...

Open Map Activity from GCM Push Notification

android,android-intent,android-activity,android-gcm,android-location
I am trying to open a specific activity called 'MapActivity' where I want to load my current position on a map and get nearby places. I got that working and also got GCM working to send push notifications to my device (Android 4.3). The only problem left is opening that...

Create google GCM testing app in emulator and get registration id using PHP

php,android,android-gcm
I'm trying to create a testing app which will run at emulator and the GCM server will use PHP. I'm looking the code how it pushes the message to target device, the following code I downloaded somewhere: <?php $json = array(); $regId = $_GET["regID"]; $msg = $_GET["msg"]; if (isset($regId) &&...

Android: Transfering Data via ContentIntent

android,push-notification,android-gcm,android-pendingintent,google-cloud-messaging
I've got a problem with my Android Application. It receives Messages via Google Cloud Messaging and displays a Notification in the Notificationbar. I want to transfer some Data with the Notification. This Data comes via Google Cloud Messaging and should be attatched to the Notification. This is my Code to...

Issues with GCM Push Notifications

android,push-notification,android-gcm,loopback
for my first question on StackOverflow I'm gonna ask about Google Cloud Messaging service, and in particular Loopback's implementation. So, I'm developing an app and started to work on a different branch to introduce Loopback's push notification handling and it's various tools for REST Api. Even if this topic is...

Why is my own sender ID getting back an InvalidRegistration message?

android,android-gcm
I have been working on implementing GCM in an application and based on Google's examples have been able to get it to work. However, when I try to use my own sender ID and scope, I get back an InvalidRegistration error when I try to send a notification. For example,...

GCM service stops working when I implement Robospice with Spring module

android-gcm,robospice
I have implemented a standard GCM client following the instructions on google developers page (Gcm implementation). Push messages have worked great no problem there. But then I implemented Robospice REST lib in the application and GCM stopped working. I am sure it does not work because of Robospice because as...

Device Not Receiving GCM Messages

java,android,android-gcm
Before anything, I am currently unable to post code info/examples because I am not presently at the machine that has the code. If necessary, I will get the appropriate snippits up when I get to that machine tomorrow. The Setup I am implementing GCM communication to local server, as according...

I need suggestions on sending push notifications

android,google-app-engine,android-gcm
I'm at the point in my android app that I need to implement push notifications, I already have a Google API key and all and have enabled push notifications on the key. I understand that notifications are to be sent from the server, downstream to the app. Essentially what I...

GCM Multiple messages in the same time

php,android,android-gcm,messaging
I am working with Google Cloud Messaging (HTTP) with PHP, so i have a PHP file that contains a function to send GCM Message. My question is: if the php script is running by multiple users in the same time which message will be sent or they all will be...

How to verify registrations on Server side implementation of GCM Push Notifications?

java,android,cordova,android-gcm,phonegap-pushplugin
My Case Android/iOS app using phonegap Push Notifications using Google Cloud Messaging (GCM) Using Phonegap plugin Push Notifications to receive downstream notifications Dropwizard on server side App content available free without registration/login on my servers Problem Currently, I'm stuck at server side implementation since I have to store registrations Ids...

GCM class cast exception

java,android,android-gcm
if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) { GooglePlayServicesUtil.getErrorDialog(resultCode, (Activity) context, PLAY_SERVICES_RESOLUTION_REQUEST).show(); } Exception: java.lang.ClassCastException: com.interconnect.garhoud.Garhoud cannot be cast to android.app.Activity at com.interconnect.library.gcm.Util.checkPlayServices(Util.java:96) at com.interconnect.library.gcm.Regiseter.handleRegister(Regiseter.java:53) at com.interconnect.library.gcm.Regiseter.onHandleIntent(Regiseter.java:30) at...

GCM defaultSenderID

android,notifications,android-gcm
Could somebody please help me understand what the gcm_defaultSenderId is in the following code (found in onHandleIntent in RegistrationIntentService.java): InstanceID instanceID = InstanceID.getInstance(this); String token = instanceID.getToken(getString(R.string.gcm_defaultSenderId), GoogleCloudMessaging.INSTANCE_ID_SCOPE, null); // [END get_token] Log.i(TAG, "GCM Registration Token: " + token); This is from the Google sample app for implementing GCM into...

com.google.api.server.spi.SystemServiceServlet ClassNotFoundException running App Engine Project

java,android,google-app-engine,android-gcm
I have an android app that I would like to add a serve backend to talk to GCM. I have followed this tutorial: https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/GcmEndpoints and created an App Engine Backend with Google Cloud Messaging module to the android project in android studio. When I run the app engine backend project,...

Android GCM notification not displayed on device

android,notifications,broadcastreceiver,android-gcm
I'm trying to add push notification to my android app. Everything seems ok : Sender id is ok device is correctly registered to my database notification is correctly sent to GCM server (success:1) Broadcast receiver correctly receives the message (i see it trough the Eclipse console) ... but the notification...

Android GCM topic subscription limit

android-gcm
With the introduction of topics in android gcm I was evaluating this option to easen the work that should be done to mantain in sync our server with some subscriptions. However I have read in the documentation that the use of topics is limited to 1 million subscriptions. Does this...

GCM Client in Java not working

java,android,android-gcm
I want to create an android GCM sender which will send the URL to the Android app. I have used this windows application to test my android app and it is working. I checked the code in C# and tried to convert it in Java. But I am not getting...

GCM FATAL EXCEPTION error

java,android,android-gcm
My android applications throws a error, Have searched online still don't understand what the error is!, any help appreciated.. 03-14 15:46:02.760: E/AndroidRuntime(5163): FATAL EXCEPTION: IntentService[GCMIntentService-DynamicSenderIds-3] 03-14 15:46:02.760: E/AndroidRuntime(5163): java.lang.ArrayIndexOutOfBoundsException: length=2; index=3 03-14 15:46:02.760: E/AndroidRuntime(5163): at com.Test.Messaging.GCMIntentService.onMessage(GCMIntentService.java:43) 03-14 15:46:02.760: E/AndroidRuntime(5163): at...

Is it possible to ask user if he wants to update google play services or not?

android,android-gcm
In the example they have for google play services they handle possible version update like this: int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(from); if (resultCode != ConnectionResult.SUCCESS) { if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) { GooglePlayServicesUtil.getErrorDialog(resultCode, context, PLAY_SERVICES_RESOLUTION_REQUEST).show(); } else { error(TAG, "this device is not supported"); } This results in a message something like "Your application...

Compress json string for gcm push notification message

json,compression,android-gcm,gzip,chrome-gcm
I have problem with json data and gcm push notification. I send big json data and it exceed 4kb limit, so is there any compression that i can use to compress that json(gzip or something like that) and send it?...

Registration ID become “NotRegistered” for no reason

android,android-gcm,google-cloud-messaging
During April, we've start receiving a lot of 'NotRegistered' errors. According to the Google docs it should happen only if app was uninstalled or updated, but in our case token can "expire" in ~40 minutes even if absolutely nothing happen with device. And what makes things even worth is that...

When multiple apps which listen to same GCM channel are installed, How to make sure the notification is shown only once?

android,notifications,broadcastreceiver,android-gcm
I'm going to publish a series of apps and I want to be able to display notifications to users who have installed any of these apps via GCM. but when there are multiple apps installed on each device, multiple notifications are displayed to users. I want to make sure that...

opening notofication from gcmIntentClass to a fragment class

android,android-intent,android-fragments,android-gcm
I am receiving a notification from GCM ... in my GcmIntentService class I did this. Intent notificationIntent = new Intent(GcmIntentService.this, HomeActivity.class); when I tap notification I want it to open a Fragment ..... I have my Fragments in HomeActivity.class from which I want to open Message Fragment. Intent notificationIntent =...

GCM did not unregister the device when the app is uninstalled

android,push-notification,android-gcm
I made an Android app. I used GCM to push notifications. I am registering the device with GCM when the user is logged in. I am using external MySql database to store the registration ids of users. It worked fine. But When I did the following steps : Installed my...

ClassNotFoundException smack XMPPConnection

java,servlets,xmpp,android-gcm,smack
im following this documentation to achieve gcm upstream message. so far,i've created a servlet,and from that servlet im calling the SmackCcsClient. ConnectionConfiguration config = new ConnectionConfiguration(GCM_SERVER, GCM_PORT); config.setSecurityMode(SecurityMode.enabled); config.setReconnectionAllowed(true); config.setRosterLoadedAtLogin(false); config.setSendPresence(false); config.setSocketFactory(SSLSocketFactory.getDefault()); connection = new XMPPTCPConnection(config); connection.connect();...

App crash when receives push notification and CGM intent service not being called

java,android,android-intent,push-notification,android-gcm
There must be something I'm doing wrong but I'm new in android studio and I can't find it. I have an app which displays four webViews, each in a tab and I'm trying to send a push, the json response code is ok, but I've established some breakpoints in my...

How to handle unregistering of push notifications?

android,cordova,android-gcm,ionic,phonegap-pushplugin
Owning an Ionic application (cordova), I'm using this plugin to handle pushing of notifications. I'm confused regarding the unregister function. Reading the official GCM documentation: You should only need to unregister in rare cases, such as if you want an app to stop receiving messages, or if you suspect that...

how much time GCM CCS wait for an acknowledgement from an XMPP server before retrying for the same message?

android,push-notification,xmpp,android-gcm,android-notifications
I have an XMPP server which receive the message from android devices through GCM. If GCM sends any message to my server and my server doesn't send any acknowledgement soon after receiving the message, how much time GCM will take to resend the same message?

A meteor package for location reporting on the background upon request send using GCM and APN

javascript,cordova,meteor,apple-push-notifications,android-gcm
The scenario: A meteor mobile app is required to report a user's location on request from server. The request arrives via GCM on Android and APN on iOS. When the request arrives the app may be on background or inactive altogether. The main challenge - how the app answers the...

Cordova Custom iOS / Android sounds when app is close or in background

cordova,apple-push-notifications,android-gcm
I'm trying to implement a custom push notification sound through GCM and APNS using my Cordova/PhoneGap app. On APNS, I've managed to get the proper beep file name using the PushPlugin. However, I have no idea how to make that sound play when the app is in the background or...

GCM Invalid JSON Missing Payload

python,xmpp,android-gcm
I am trying to send messages through Google Cloud Messaging, using Python sleekXMPP. I tried to follow the sample in the GCM docs. However, I am getting an "InvalidJson : MissingPayload" error response (400) when I call send_command. What am I missing here? The following is the code that I...

New GCM google-services.json and plugin needed?

android-gcm,google-cloud-messaging
The latest GCM update includes steps on developer.google.com to create a configuration file and use a gradle plugin. I have an existing app that already configured to use GCM. Is switching to the plugin recommended? Will this cause any problems. Looks like Google is moving to using this plugin &...

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil

java,android,eclipse,android-gcm,google-cloud-messaging
I'm trying to run the sample of Google Cloud Messaging, which follows the tutorial from official website https://developer.android.com/google/gcm/client.html. However, the sample suddenly crash and generate the error as following: After tracing, I found the error in this block of code: /** * Check the device to make sure it has...

Why does the InstanceID service automatically start and how do I preven this?

java,android,android-gcm
I have an android application where I'm using GCM. I'm following the tutorials and using an InstanceIDListenerService class which I'm attempting to fire off as an IntentService after a "subscription" page where the user enters some information. There is also some preliminary code firing off prior to this subscription page...

How to save Activity Class as a variable to use it later in android

java,android,android-activity,sharedpreferences,android-gcm
i'd like to know how can i store a class as a variable. for example i'd like to store which activity to open-up when push notification is clicked, for that i created a method which accepts a class with activity extension final Class<? extends Activity> ActivityToOpen what i want is...

Unable to Register Android App with GCM : Not allowed to start service Intent

android,android-intent,android-gcm
Building An App using the Android Studio. There is some issue in the App configuration that throws a java.lang.SecurityException. The project is stored in https://github.com/snambi/gcm_register The AndroidManifest.xml <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" /> <uses-permission android:name="android.permission.GET_ACCOUNTS"/> <uses-permission...

Google old GCM vs. Google New GoogleCloudMessaging

android,android-gcm,google-play-services,google-cloud-messaging
i'm developing a news application and i'm confused between using the old GCM and the new GoogleCloudMessaging, they said GCM is deprecated, but it runs well when you get the gcm.jar and compile it in your app. So my question: is it safe to use the old deprecated GCM method...

Using GCM service in android

java,android,android-gcm
What I am doing: I am using push notification to recieve notifications. I have used the code below I also have declared necessary permissions in manifest What is happening: I am able to recieve the notification But when the new notification comes, old one is replaced What I am trying...

Android gcm notification payload vs data payload?

android,android-gcm
According to https://developers.google.com/cloud-messaging/server-ref gcm message can have notification payload or/and data payload What is the difference between these two?

Warning on GCM with PHP

php,android-gcm,yii2
I'm using GCM in php. Everything is fine. But im getting response as "Field \"data\" must be a JSON array: example\n" My code for GCM is function sendNotification($registrationIdsArray, $messageData) { $data = array( 'data' => $messageData, 'registration_ids' => $registrationIdsArray ); var_dump($data); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $this->header); curl_setopt($ch, CURLOPT_URL, "https://android.googleapis.com/gcm/send");...

Android GCM start specific Activity fails

android,android-gcm
I have this code to generate a notification from inside the GCM-Service: private void sendNotification(Bundle extras) { int icon = R.drawable.ic_launcher; long when = System.currentTimeMillis(); String notification_type = extras.getString("type"); NotificationManager notificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE); Notification notification = new Notification(icon, extras.getString("message"), when); String title = this.getString(R.string.app_name); Intent notificationIntent = new Intent(this,...

GCM set expiration date for push notifications

php,android,push-notification,android-gcm
I am successfully sending GCM push notifications for my android users using PHP, but i want to set expiration date for my push notifications so in case the user has no internet connection for 1 week, it will not receive the old push notifications. How i can achieve it. Thank...

What is authorizedEntity? Can't find gcm_defaultSenderId in own app

java,android,android-studio,android-gcm
I am trying to get my app running with Google Cloud Messaging. I am following the Google Cloud Messaging Quickstart App which can be found here on github. In their quickstart app at some point we ask the Google Cloud Messaging service for a registration token so that this instance...

The difference between GCM and PARSE push messages

android,parse.com,android-gcm
I am buiding an android app which will be receiving notifications from my server. This means all my users which is above 1 million, will receive notifications from my server. I know parse and google cloud messaging(GCM) can do the push messages but please I want to know the best...

How to get Application from Context

android,android-gcm
Is there a way I can get application from Context. I noticed that activity and service has getApplication() method but Context does not. Background: I am using/extending the GCMBaseIntentService and the protected abstract void onMessage (Context context, Intent intent) gives me a context as a parameter. I would like to...

Push notification reaching ios (apns) but not android (gcm) device

android,push-notification,android-gcm,google-cloud-messaging
So I have a simple Ruby app that uses Rpush to send push notifications to my iphone and my android phone. Right now all it does is sends it to the iphone. I am not sure whether the problem is with my script (i.e. incorrect values for the registration_id, app_name,...

Weird push message received on app start

android,push-notification,android-gcm,google-cloud-messaging
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 spot which code change is to blame for this. Has anyone seen this message before and maybe knows where is it coming from and why?...

GCM MultiCastResult Approach

android,android-gcm
This is my approach to use gcm for more than 1000 devices. Is it right that way? As I cannot try it unless I have more than 1000 users so any feedback would be appreciated and most importantly am I checking errors correctly? and updating database in a right way?...

send multiple messages to single device in one shot in GCM?

android,push-notification,android-gcm
As we can send one message to multiple device, in the same way Can we send multiple suppose 10 message to single device at the same time (in one shot) in GCM?

When phone is offline GCM stores a LIST of messages or only the last one, just like APNS?

android,push-notification,apple-push-notifications,android-gcm
When phone is offline GCM stores a LIST of messages or only the last one, just like APNS? I've read a lot about it, but as the documentation says: 1. The GCM connection server enqueues and stores the message if the device is offline. 2. When the device is online,...

GCM, how do I know end of XMPP packet?

python,sockets,xmpp,android-gcm,google-cloud-messaging
I'm implementing a Google Cloud Messaging XMPP server in Python. I can connect and authenticate to the GCM, however I use self.ssl_sock.recv(1024) which isn't good, but works for the auth. However when I later on want to receive messages from the GCM I read on the socket, but how many...

How to send data from BroadcastReceiver to Fragment in android

android,service,broadcastreceiver,fragment,android-gcm
I am trying to make an chatting app.I have a SlidingDrawer Activity and it has many fragments and among which ChatFragment is one.Now when i am sending message to my friend , i have a Chatting Window and if any message comes from GCM service and i am in ChatFragment...