Use the getCurrentPlace API to learn about the most likely place that the user is currently located in, along with how to determine the most likely place among a list of returned places from the API
- [Voiceover] Now that we've set up the project…in the developer console, and received an API key,…we can build our first exercise,…using the place's API.…The first API we're going to look at,…tells us the most likely place the user is currently in.…There are a few steps involved with this.…First, we need to request the…ACCESS_FINE_LOCATION permission.…Next, we call the getCurrentPlace method,…and set a result callback for it.…The result callback will be given a data structure,…called a PlaceLikelihood buffer.…
This will contain a list of PlaceLikelihood objects,…each of which will contain a place object,…and a floating point number,…that indicates the percentage likelihood,…that the user is in that place.…Note that these percentages do not necessarily…all add up to be 100.…Using this data,…we can figure out where the user most likely is,…and we can then extract information about that place.…There's a whole bunch of functions available…on the place object,…that we can use to learn more about that place.…
You can see that we can obtain information,…
Programming expert Joe Marini covers how to retrieve and work with a user's location and get continuous location updates with Location services; target and authenticate users and access their profile information with Google Sign-In; and work with the Google Drive API to store and retrieve content. Joe also shows you how to use the Google Places API to get information about places such as addresses, phone numbers, and website URLs, along with how to send messages to individual devices using Google Cloud Messaging. By the end of this course, you should be able to incorporate Google Play services into your own apps and take advantage of the various features it provides.
- Using Google Play services in your Android project
- How the Google Play services life cycle works
- Retrieving the user's location with Location services
- Working with location data
- Performing a geocoding operation
- Using Google Sign-In to access user information
- Storing information with the Google Drive API
- Working with the Google Places API
- Communicating via Google Cloud Messaging (GCM)
Skill Level Intermediate
1. Play Services Basics
2. Location Services
3. Google Sign-In
4. Google Drive
5. The Places API
6. Google Cloud Messaging
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.