Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

Google Play Services Course (How To)

via Treehouse

Overview

Google Play Services are a suite of APIs that give developers access to Google’s extensive cloud services and access the user’s Google account for personalization on Android devices. Google Play Services comes pre-installed on user’s devices and auto-updates every 6 weeks providing the latest APIs on all devices accessing the Play Store. You’ll learn the code necessary to access APIs like Google+ to bring personalization to your user experience. You’ll learn common errors and how to handle devices that can’t access Play Services. When you’re done you’ll be able to add other services like Maps, Cast, or Ads to elevate your app above the competition.

What you'll learn

  • Add Google Play Services to your project
  • Add Maps, Cast, or Ads
  • Working within Google+

Syllabus

Adding Play Services to your App

The app you’re about to build allows you to share items you find on Etsy with your friends on Google+. It makes use of two APIs provided by Google and Etsy. To gain access to their API you need to register your app by visiting their site and following the directions. Here’s what it takes to make it happen:

Chevron 4 steps
  • Authorize Google+ API in the Google API Console

    2:59

  • Connecting Your Project to the API

    8:28

  • Adding the Code Library and Permissions

    4:16

  • Review: Adding Play Services

    5 questions

Interacting with Your API

Before you can share data through the Google+ APIs you need a UI to display items from Etsy. You can access Etsy’s API with the help of a library and display items in a beautiful grid.

Chevron 10 steps
  • Add Third Party Libraries

    2:29

  • Data Model Classes

    4:34

  • Interacting with Retrofit

    4:47

  • Write a Retrofit interface

    4 objectives

  • Writing Your UI Code with RecyclerView

    4:16

  • Writing Your Adapter Class

    8:31

  • Defining onBindViewHolder()

    4 objectives

  • Wrapping Your UI Code

    4:55

  • Display Loading and Error States

    7:51

  • Review: Interacting with the API

    5 questions

Connecting to Play Services

With data ready to share now you can add in Google Play Services to your project. Play Services already reside on the device as part of the Google Play Store. Here’s how we can connect to them:

Chevron 6 steps
  • Create GooglePlayServiceHelper

    4:59

  • State Handling of GoogleApiClient

    5:25

  • Handling Error State

    6:09

  • Integrating GoogleServicesHelper

    8:34

  • Notify an Adapter of Changed Data

    1 objective

  • Review: Connecting to Play Services

    5 questions

Interacting with Google+ APIs

Now that you’re connected with Google Play Services access the user’s Google+ account and allow them to share items with their friends:

Chevron 7 steps
  • Requesting Access to Google+ APIs

    2:16

  • Setup the PlusOneButton

    9:04

  • Share Button

    5:16

  • Using a Share Intent

    4 objectives

  • UI Polish for your App

    5:48

  • Conclusion

    1:24

  • Review: Interacting with Google+ APIs

    4 questions

Taught by

Jamie Huson

Reviews

Start your review of Google Play Services Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.