Mobile Development CMPS 297 Fall 2016-17
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 •
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
Google Play Services
Google Play Services • In the build.gradle file
Using Google API Client • Permissions: • <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> • Or <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
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