New Forums Created for Windows 10 Development

Microsoft, looking to be a player in the game of giants with their recent announcement of … more

T-Mobile Expands Its LTE Network

T-Mobile US has announced moreLTE network expansion. The carrierwill provide asignal for the700 MHz band, … more

Kernel Source Available for HTC One M8

HTC pushed the Lollipop-based Sense update to the developer edition of the HTC One M8 just a couple … more

Asus Hints at Upcoming Week-long Battery Smartwatch

Asus hinted that their next smartwatch, succesor to the elegant ZenWatch, could feature … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Thread Deleted

Registering devices with GCM error

OP mur762

Prev Previous Post   Next Post Next
28th June 2014, 09: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