Joe Malin | 3ddba7e | 2013-03-04 10:33:30 -0800 | [diff] [blame] | 1 | page.title=Making Your App Location-Aware |
Joe Fernandez | 33baa5a | 2013-11-14 11:41:19 -0800 | [diff] [blame] | 2 | page.tags=location,geofence,geofencing,activity recognition,activity detection,gps |
Joe Malin | 3ddba7e | 2013-03-04 10:33:30 -0800 | [diff] [blame] | 3 | |
| 4 | trainingnavtop=true |
| 5 | startpage=true |
| 6 | |
| 7 | |
| 8 | @jd:body |
| 9 | |
| 10 | <div id="tb-wrapper"> |
| 11 | <div id="tb"> |
| 12 | |
| 13 | <!-- Required platform, tools, add-ons, devices, knowledge, etc. --> |
| 14 | <h2>Dependencies and prerequisites</h2> |
| 15 | <ul> |
| 16 | <li>Google Play services client library (latest version)</li> |
| 17 | <li>Android version 2.2 (API level 8) or later</li> |
| 18 | </ul> |
| 19 | |
| 20 | <!-- related docs (NOT javadocs) --> |
| 21 | <h2>You should also read</h2> |
| 22 | <ul> |
| 23 | <li> |
| 24 | <a href="{@docRoot}google/play-services/setup.html">Setup Google Play Services SDK</a> |
| 25 | </li> |
| 26 | </ul> |
| 27 | |
| 28 | </div> |
| 29 | </div> |
| 30 | |
| 31 | <p> |
| 32 | One of the unique features of mobile applications is location awareness. Mobile users bring |
| 33 | their devices with them everywhere, and adding location awareness to your app offers users a |
| 34 | more contextual experience. The new Location Services API available in Google Play services |
| 35 | facilitates adding location awareness to your app with automated location tracking, |
| 36 | geofencing, and activity recognition. This API adds significant advantages over the plaform's |
| 37 | location API. |
| 38 | </p> |
| 39 | <p> |
| 40 | This class shows you how to use Location Services in your app to get the current location, |
| 41 | get periodic location updates, look up addresses, create and monitor geofences, and |
| 42 | detect user activities. The class includes sample apps and code snippets that you can use as a |
| 43 | starting point for adding location awareness to your own app. |
| 44 | </p> |
| 45 | <p class="note"> |
| 46 | <strong>Note:</strong> Since this class is based on the Google Play services client library, |
| 47 | make sure you install the latest version before using the sample apps or code snippets. To learn |
| 48 | how to set up the client library with the latest version, see |
| 49 | <a href="{@docRoot}google/play-services/setup.html">Setup</a> in the Google Play services guide. |
| 50 | </p> |
| 51 | <h2>Lessons</h2> |
| 52 | <dl> |
| 53 | <dt> |
| 54 | <b><a href="retrieve-current.html">Retrieving the Current Location</a></b> |
| 55 | </dt> |
| 56 | <dd> |
| 57 | Learn how to retrieve the user's current location. |
| 58 | </dd> |
| 59 | <dt> |
| 60 | <b><a href="receive-location-updates.html">Receiving Location Updates</a></b> |
| 61 | </dt> |
| 62 | <dd> |
| 63 | Learn how to request and receive periodic location updates. |
| 64 | </dd> |
| 65 | <dt> |
| 66 | <b><a href="display-address.html">Displaying a Location Address</a></b> |
| 67 | </dt> |
| 68 | <dd> |
| 69 | Learn how to convert a location's latitude and longitude into an address (reverse |
| 70 | geocoding). |
| 71 | </dd> |
| 72 | <dt> |
| 73 | <b> |
| 74 | <a href="geofencing.html">Creating and Monitoring Geofences</a> |
| 75 | </b> |
| 76 | </dt> |
| 77 | <dd> |
| 78 | Learn how to define one or more geographic areas as locations of interest, called geofences, |
| 79 | and detect when the user is close to or inside a geofence. |
| 80 | </dd> |
| 81 | <dt> |
| 82 | <b><a href="activity-recognition.html">Recognizing the User's Current Activity</a></b> |
| 83 | </dt> |
| 84 | <dd> |
| 85 | Learn how to recognize the user's current activity, such as walking, bicycling, |
| 86 | or driving a car, and how to use this information to modify your app's location strategy. |
| 87 | </dd> |
Joe Malin | 72fdbc8 | 2013-07-26 17:26:52 -0700 | [diff] [blame] | 88 | <dt> |
| 89 | <b><a href="location-testing.html">Testing Using Mock Locations</a></b> |
| 90 | </dt> |
| 91 | <dd> |
| 92 | Learn how to test a location-aware app by injecting mock locations into Location |
| 93 | Services. In mock mode, Location Services sends out mock locations that you inject instead |
| 94 | of sensor-based locations. |
| 95 | </dd> |
Joe Malin | 3ddba7e | 2013-03-04 10:33:30 -0800 | [diff] [blame] | 96 | </dl> |