Code Monkey home page Code Monkey logo

gcm's People

Contributors

ashish-s-sharma avatar the-felipeal avatar tjohns avatar

Watchers

 avatar

gcm's Issues

java.lang.IllegalArgumentException: argument cannot be null in Sender.java when handling HTTP errors on multi-cast messages

What steps will reproduce the problem?

1. From the application server using the supplied gcm-server.jar helper 
classes, attempt to send a multicast message to the GCM server using API 
parameters that would result in the GCM replying with a non-200 HTTP status 
(Eg. 401 for error authenticating the sender account) 

What is the expected output? What do you see instead?

The expected result is for the Sender to throw a InvalidRequestException 
similar to how it does for non-multi cast messages. This would allow the user 
of the class to handle the  problem accordingly.

Instead, using the attached test case, the send request fails with:

Exception in thread "main" java.lang.IllegalArgumentException: argument cannot 
be null
    at com.google.android.gcm.server.Sender.nonNull(Sender.java:553)
    at com.google.android.gcm.server.Sender.getString(Sender.java:534)
    at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:365)
    at com.google.android.gcm.server.Sender.send(Sender.java:261)


What version of the product are you using? On what operating system?

The gcm-server.jar MANIFEST.MF file indicates:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0-google-v4-61258-31622288 (Sun Microsystems Inc.)
Implementation-Vendor: Google
Implementation-Title: Google Cloud Messaging - server support
Implementation-Version: 1.0.2

This has been tested under Linux on two machines (same result): Ubuntu 10.04 
LTS with java 1.6.0_26 and CentOS release 5.8 with 1.6.0_20.


Please provide any additional information below.

The original stackoverflow entry can be found here: 
http://stackoverflow.com/questions/11878428/exception-on-web-server-while-implem
enting-google-cloud-messaging/11944282#11944282

gcm group entry:
https://groups.google.com/forum/#!topic/android-gcm/VZhq7-QdLkA%5B1-25%5D

Attached is a test class which reproduces the problem.

Original issue reported on code.google.com by loconet on 14 Aug 2012 at 6:55

Attachments:

Ability to pick up the GCM sender ID from the Android app's config

Hi,

This feature request follows the discussion on the android-gcm mailing list 
here: https://groups.google.com/forum/?fromgroups#!topic/android-gcm/T0FFavXQcmA

------------------------------------------------------------
We have different Google API projects for different environments that we have - 
dev, test, prod. These were created for OAuth2 integration earlier and we are 
looking at enabling Google Cloud Messaging for all these projects and use them 
in respective environments (we want to use the environment specific project IDs 
to keep GCM statistics for these isolated).

So, we would like to have the ability to pick-up the sender ID (based on the 
env the APK is built for) from our Android client's config file instead of 
hard-coding it in the code.

The issue we are facing is that GCMBaseIntentService expects sender ID to be 
passed in its constructor, where the app context is not available, else I could 
have fetched the config using it.
------------------------------------------------------------

The above mentioned mailing-list suggests a code change that will help such 
use-cases.

Thanks for your support.

Original issue reported on code.google.com by [email protected] on 12 Jul 2012 at 4:29

GCMBroadcastReceiver.onReceive() throws exception when receiving retry intent if app uses a custom intent service class

Hi.

I`m not good english write
so May write the wrong meaning is unclear.


The 'GCMConstants' class has fixed on 'GCMIntentService' class name and package 
name 

'GCMBroadcastReceiver' is used only in the default value.

I want to change the default value to another value.
So 'GCMBroadcastReceiver' to extends 'GCMCustomBroadcastReceiver' made​​.
'getGCMIntentServiceClassName' method to the 'Override' came to try to change 
the default value.
And 'AndroidManifest.xml' file in the 'GCMCustomBroadcastReceiver' declare and 
'GCMBroadcastReceiver' was not declared.
But 'GCMRegistrar' class of 'setRetryBroadcastReceiver ()', there is the 
following code in.

sRetryReceiver = new GCMBroadcastReceiver ();

Thus, 'com.google.android.gcm.intent.RETRY' broadcast received by 
'GCMBroadcastReceiver'

This generates a Runtime Exception.
because 'GCMBroadcastReceiver' class is not declare 'AndroidManifest.xml' file 

So I want to GCMBroadcastReceiver class 'setGCMIntentServiceClassName' method 
to add


Refer to my code : 
http://code.google.com/r/erkasraim-gcm/source/browse/gcm-client/src/com/google/a
ndroid/gcm/GCMBroadcastReceiver.java

Original issue reported on code.google.com by [email protected] on 23 Jul 2012 at 8:37

send() throws NPE if payload has data with null value

Here's the stack trace:

java.lang.NullPointerException
    at java.net.URLEncoder.encode(URLEncoder.java:205)
    at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:166)
    at com.google.android.gcm.server.Sender.send(Sender.java:121)

Sender should either check if the value is null, or Message's addData() should 
not allow it...

Original issue reported on code.google.com by [email protected] on 1 Aug 2012 at 8:13

GCM through Proxy


I am trying to work GCM through proxy . I don't find any way to give my proxy 
details in the GCM server docs . 

I tried to set the System.setProperty . But it is not working for me .

The only way i can able to work it by modifying the gcm-server .  [ Included 
proxy details in Post() method . ]

Thanks 
D.Murugesan

Original issue reported on code.google.com by [email protected] on 28 Aug 2012 at 10:03

Latest client gcm.jar file not being distributed through Android SDK Manager

Getting the GCM files through Android SDK Manager does not distribute the 
latest GCM files.

This fix is _not_ in the latest GCM files from SDK Manager.

https://code.google.com/p/gcm/source/diff?spec=svne1a099b36566c265f758facf70b8f4
f3684ed0ea&r=e1a099b36566c265f758facf70b8f4f3684ed0ea&format=side&path=/gcm-clie
nt/src/com/google/android/gcm/GCMBroadcastReceiver.java

I had to manually add in this fix to the source files and compile against those 
in order to fix the "internal error: retry receiver class not set yet" in 
GCMRegistrar error.

Original issue reported on code.google.com by [email protected] on 1 Oct 2012 at 8:06

build file for gcm-demo-appengine wrong

What steps will reproduce the problem?
1. do ant compile or ant war
2. do ant clean or ant full-clean
3. look for compiled classes

What is the expected output? What do you see instead?
classes directory should have been removed, classes are still there.

What version of the product are you using? On what operating system?
this ant build file has no version number data, perhaps you should put one in? 
running under OS X - Darwin Kernel Version 11.4.0

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 18 Jul 2012 at 8:31

I want GCMBroadcastReceiver add API

What steps will reproduce the problem?
1. new GCMCustomBroadcastReceiver extend 'GCMBroadcastReceiver' class
2. override 'getGCMIntentServiceClassName' method (change GCMIntentService 
class name or package name)
3. send broadcast 'com.google.android.gcm.intent.RETRY'

What is the expected output? What do you see instead?
GCMRegistrar.setRetryBroadcastReceiver method is new GCMBroadcastReceiver(), 
this is not define my AndroidMenifest.xml file

What version of the product are you using? On what operating system?
gcm 1.0.1 version and running under OS X - 10.7.4

Please provide any additional information below.

this problem solve
1. Add setter GCMBroadcastReceiver class(setGCMIntentServiceClassName method)
2. this is my git clone url : http://code.google.com/r/erkasraim-gcm/


Original issue reported on code.google.com by [email protected] on 23 Jul 2012 at 3:32

Sender methods are not retrying on all scenarios

What steps will reproduce the problem?
1. Face a JSON InternalServerError when calling send(Message, List<String>, int)

What is the expected output? What do you see instead?

It's expected that the Sender retries to send the messages in the same way when 
a JSON UnavailableError is received.

What version of the product are you using? On what operating system?

1.0.2 on Ubuntu 64bits

Please provide any additional information below.

Attached a patch to fix the issue, I'll add a git clone soon.

Original issue reported on code.google.com by [email protected] on 4 Sep 2012 at 1:35

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.