Android L is for Lockdown

Root is, without a doubt, the (un)holy grail of the Android world. Those wonderful permissions that allow you as … more

XDA Xposed Tuesday: XHangouts Will Improve Your Hangouts

Ever since Google started supporting text messaging in Hangouts many people have … more

Shattered Screen? Turn Your Broken Device into a Complete Media Center!

A cracked screen usually means you’ll have to spend a hefty … more

Gmail 5.0: Material Design and Multiple Account Support

Google started to materialize many of its applications right after announcing the … more
Thread Deleted

Registering devices with GCM error

OP mur762

Prev Previous Post   Next Post Next
28th June 2014, 08:18 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Apr 2008
Hello everybody,

I'm experimenting with Google Cloud Messaging and I was following the tutorial at https :// github. com/ GoogleCloudPlatform/gradle-appengine-templates/blob/master/GcmEndpoints/README.md (I beg pardon but I can't post links). Unfortunately I spent the last two days struggling with solving all the dependencies but I still miss one.

In this code (taken from the tutorial at point 2.2) I cannot resolve the class "Registration"; I've been trying looking for it but given such a vague name I got back millions results that had little to do with my problem.

I also tried to add to my project all the suggested libraries but none of them contained the class I need.

Code:
        
    public GcmRegistrationAsyncTask() {
        Registration.Builder builder = new Registration.Builder(AndroidHttp.newCompatibleTransport(), new AndroidJsonFactory(), null)
            // Need setRootUrl and setGoogleClientRequestInitializer only for local testing, otherwise they can be skipped
            .setRootUrl("h t t p : / / 10.0.2.2:8080/_ah/api/")
            .setGoogleClientRequestInitializer(new GoogleClientRequestInitializer() {
                @Override
                public void initialize(AbstractGoogleClientRequest<?> abstractGoogleClientRequest) throws IOException {
                    abstractGoogleClientRequest.setDisableGZipContent(true);
                }
            });
            // end of optional local run code

        regService = builder.build();
    }
Could somebody point me in the right direction?

Thanks in advance for the help!

Bye
Mario
Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Java for Android App Development by ThreadRank