Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ddba7ee authored by Joe Malin's avatar Joe Malin
Browse files

Android U: Making Apps Location-Aware

Change-Id: I8f44c6ca6d797ceb8ada5b2c723a8cca0081cf0a
parent 4da9c11b
Loading
Loading
Loading
Loading
+45.4 KiB

File added.

No diff preview for this file type.

+67.7 KiB

File added.

No diff preview for this file type.

+48.4 KiB

File added.

No diff preview for this file type.

+24 −16
Original line number Diff line number Diff line
@@ -4,13 +4,6 @@ page.title=Location and Maps
<div id="qv-wrapper">
<div id="qv">

  <h2>Quickview</h2>
  <ul>
    <li>Android provides a location framework that your application can use to determine the
device's location and bearing and register for updates</li>
    <li>A Google Maps external library is available that lets you display and manage Maps data</li>
  </ul>

<h2>In this document</h2>
  <ol>
    <li><a href="#location">Location Services</a></li>
@@ -19,8 +12,23 @@ device's location and bearing and register for updates</li>

</div>
</div>

<p>Location and maps-based apps offer a compelling experience on mobile devices. You
<div class="note">
<p>
    <strong>Note:</strong> This is a guide to the <i>Android framework</i> location APIs in the
    package {@link android.location}. The Google Location Services API, part of Google Play
    Services, provides a more powerful, high-level framework that automates tasks such as
    location provider choice and power management. Location Services also provides new
    features such as activity detection that aren't available in the framework API. Developers who
    are using the framework API, as well as developers who are just now adding location-awareness
    to their apps, should strongly consider using the Location Services API.
</p>
<p>
    To learn more about the Location Services API, see
    <a href="{@docRoot}google/play-services/location.html">Google Location Services for Android</a>.
</p>
</div>
<p>
    Location and maps-based apps offer a compelling experience on mobile devices. You
    can build these capabilities into your app using the classes of the {@link
    android.location} package and the Google Maps Android API. The sections below provide
    an introduction to how you can add the features.
+29 −22
Original line number Diff line number Diff line
@@ -2,15 +2,8 @@ page.title=Location Strategies
page.tags="geolocation","maps","mapview"
@jd:body

<div id="qv-wrapper">
<div id="qv">

  <h2>Quickview</h2>
  <ul>
    <li>The Network Location Provider provides good location data without using GPS</li>
    <li>Obtaining user location can consume a lot of battery, so be careful how
long you listen for updates</li>
  </ul>
<div id="tb-wrapper">
<div id="tb">
  <h2>In this document</h2>
  <ol>
    <li><a href="#Challenges">Challenges in Determining User Location</a></li>
@@ -38,7 +31,21 @@ long you listen for updates</li>
  </ol>
</div>
</div>

<div class="note">
<p>
    <strong>Note:</strong> The strategies described in this guide apply to the platform location
    API in {@link android.location}. The Google Location Services API, part of Google Play
    Services, provides a more powerful, high-level framework that automatically handles location
    providers, user movement, and location accuracy. It also handles
    location update scheduling based on power consumption parameters you provide. In most cases,
    you'll get better battery performance, as well as more appropriate accuracy, by using the
    Location Services API.
</p>
<p>
    To learn more about the Location Services API, see
    <a href="{@docRoot}google/play-services/location.html">Google Location Services for Android</a>.
</p>
</div>
  <p>Knowing where the user is allows your application to be smarter and deliver
better information to the user. When developing a location-aware application for Android, you can
utilize GPS and Android's Network Location Provider to acquire the user location. Although
Loading