Slides Lecture 19 - Sensors - Location.pdf - Mobile Development CMPS 297 Fall 2016-17 Getting Last Known Location \u2022 Using the Google Play services

Slides Lecture 19 - Sensors - Location.pdf - Mobile...

This preview shows page 1 - 7 out of 25 pages.

Mobile Development CMPS 297 Fall 2016-17
Image of page 1
Getting Last Known Location Using the Google Play services location APIs, your app can request the last known location of the user's device Usually equivalent to the user’s current location Specifically, use the fused location provider to retrieve the device's last known location. The fused location provider is one of the location APIs in Google Play services. To setup the Google Play Services: To access the fused location provider, your app's development project must include Google Play services Download and install the Google Play services component via the SDK Manager in Android Studio and add the library to your project
Image of page 2
Location API’s One of the unique features of mobile applications is location awareness The location APIs available in Google Play services facilitate adding location awareness to your app with automated location tracking, geofencing, and activity recognition The Google Play services location APIs are preferred over the Android framework location APIs (android.location) as a way of adding location awareness to your app
Image of page 3
Google Play Services
Image of page 4
Google Play Services In the build.gradle file
Image of page 5
Using Google API Client Permissions: <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> Or <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Image of page 6
Image of page 7

You've reached the end of your free preview.

Want to read all 25 pages?

  • Summer '19
  • Geographic coordinate system, Google Play services location APIs

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture