Sony to Extend its AOSP Program to Other Devices

Sony will be offering its users the possibility to use AOSP ROMs as an alternative to the … more

Project Ara Smartphone Will Run Modified Android L with Hot Swapping

Project Ara is a very exciting topic–both for hardware and … more

Streamline Android Theme Customization with Graphic Porter

I dont have a custom theme on my Android phone, and the reason for this is because … more

Boost the Brightness of Your Sony Xperia Z1’s LED

I think the last time anyone has ever used a physical torch to find their earphones, … more
Thread Deleted

Registering devices with GCM error

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