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

Commit db248204 authored by Dirk Dougherty's avatar Dirk Dougherty Committed by The Android Open Source Project
Browse files

am 7eeb5d5c: AI 147807: Miscellaneous doc fixes needed for 1.5 SDK push

Merge commit '7eeb5d5c' into donut

* commit '7eeb5d5c':
  AI 147807: Miscellaneous doc fixes needed for 1.5 SDK push
parents 323d8213 7eeb5d5c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ applications on the emulator. </p>
    <dd>A QEMU-based device-emulation tool that you can use to design, 
    debug, and test your applications in an actual Android run-time environment. </dd>

  <dt><a href="emulator.html">Android Virtual Devices (AVDs)</a></dt>
  <dt><a href="avd.html">Android Virtual Devices (AVDs)</a></dt>
    <dd>Virtual device configurations that you create, to model device
        characteristics in the Android Emulator. In each configuration, you can
        specify the Android platform to run, the hardware options, and the

docs/html/guide/topics/geo/lbs.jd

deleted100644 → 0
+0 −73
Original line number Diff line number Diff line
page.title=Location-based Service APIs
@jd:body

<p>The Android SDK includes two packages that provide Android's primary support
for building location-based services:
{@link android.location} and com.google.android.maps. 
Please read on below for a brief introduction to each package.</p>

<h2>android.location</h2>

<p>This package contains several classes related to
location services in the Android platform. Most importantly, it introduces the 
{@link android.location.LocationManager}
service, which provides an API to determine location and bearing if the
underlying device (if it supports the service). The LocationManager 
should <strong>not</strong> be
instantiated directly; rather, a handle to it should be retrieved via
{@link android.content.Context#getSystemService(String)
getSystemService(Context.LOCATION_SERVICE)}.</p>

<p>Once your application has a handle to the LocationManager, your application
will be able to do three things:</p>

<ul>
    <li>Query for the list of all LocationProviders known to the
    LocationManager for its last known location.</li>
    <li>Register/unregister for periodic updates of current location from a
    LocationProvider (specified either by Criteria or name).</li>
    <li>Register/unregister for a given Intent to be fired if the device comes
    within a given proximity (specified by radius in meters) of a given
    lat/long.</li>
</ul>

<p>However, during initial development, you may not have access to real 
data from a real location provider (Network or GPS). So it may be necessary to
spoof some data for your application, with some mock location data.</p>

<p class="note"><strong>Note:</strong> If you've used mock LocationProviders in
previous versions of the SDK (m3/m5), you can no longer provide canned LocationProviders
in the /system/etc/location directory. These directories will be wiped during boot-up.
Please follow the new procedures below.</p>


<h3>Providing Mock Location Data</h3>

<p>When testing your application on the Android emulator, there are a couple different
ways to send it some spoof location data: with the DDMS tool or the "geo" command.</p>

<h4 id="ddms">Using DDMS</h4>
<p>With the DDMS tool, you can simulate location data a few different ways:</p>
<ul>
    <li>Manually send individual longitude/latitude coordinates to the device.</li>
    <li>Use a GPX file describing a route for playback to the device.</li>
    <li>Use a KML file describing individual placemarks for sequenced playback to the device.</li>
</ul>
<p>For more information on using DDMS to spoof location data, see the 
<a href="{@docRoot}reference/ddms.html#emulator-control">Using DDMS guide</a>.

<h4 id="geo">Using the "geo" command</h4>
<p>Launch your application in the Android emulator and open a terminal/console in
your SDK's <code>/tools</code> directory. Now you can use:</p>
<ul><li><code>geo fix</code> to send a fixed geo-location.
	<p>This command accepts a longitude and latitude in decimal degrees, and
	an optional altitude in meters. For example:</p>
	<pre>geo fix -121.45356 46.51119 4392</pre>
    </li>
    <li><code>geo nmea</code> to send an NMEA 0183 sentence.
	<p>This command accepts a single NMEA sentence of type '$GPGGA' (fix data) or '$GPRMC' (transit data).
	For example:</p>
	<pre>geo nmea $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62</pre>
    </li>
</ul>
+0 −28
Original line number Diff line number Diff line
page.title=Obtaining a MapView API Key
@jd:body

<p>MapView is a very useful class that lets you easily integrate Google Maps into your application. It provides built-in map downloading, rendering, and caching, as well as a variety of display options and controls. It provides a wrapper around the Google Maps API that lets your application request and manipulate Google Maps data through class methods, and it lets you work with Maps data as you would other types of Views. </p>

<p>Because MapView gives you access to Google Maps data, you need to register your application with the Google Maps service and agree to the applicable Terms of Service, before your MapView will be able to obtain data from Google Maps. This will apply whether you are developing your application on the emulator or preparing your application for deployment to mobile devices. </p>

<p>Registering your application is simple, and has two parts: </p>

<ol>
<li>Registering a public key fingerprint from the certificate that you will use to sign the .apk. The registration service then provides you a Maps API Key that is associated with your application's signer certificate. </li>
<li>Adding the Maps API Key to a special attribute of the MapView element &mdash; <code>android:apiKey</code>. You can use the same Maps API Key for any MapView in any application, provided that the application's .apk is signed with the certificate whose fingerprint you registered with the service. </li>
</ol>

<p>Once you have registered your application as described above, your MapView will be able to retrieve data from the Google Maps servers. </p>

<div class="special">
<p>The MapView registration service is not yet active and Google Maps is not yet enforcing the Maps API Key requirement. The registration service will be activated soon, so that MapViews in any application deployed to a mobile device will require registration and a valid Maps API Key.</p>

<p>As soon as the registration service becomes available, this page (<a href="http://code.google.com/android/toolbox/apis/mapkey.html">http://code.google.com/android/toolbox/apis/mapkey.html</a>) will be updated with details about how and where to register and how to add your Maps API Key to your application. </p>

<p>In the meantime, you can continue developing your MapView without registration, provided that you:</p>
<ol type="a">
<li>Add the attribute "android:apiKey" to the MapView element in your layout XML, with any value. Or</li>
<li>Include an arbitrary string in the <code>apikey</code> parameter of the MapView constructor, if creating the MapView programmatically. </li>
</ol>

<p>When the Maps API Key checking is activated in the service, any MapViews that do not have a properly registered apiKey will stop working.  The map data (tile images) of the MapView will never load (even if the device is on the network). In this case, go to the page linked above and read about how to register your certificate fingerprint and obtain a Maps API Key. </p>
+1152 −1152
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ page.title=SONiVOX JETCreator User Manual
<p>This document contains the user guidelines
for the SONiVOX JET Creator, an authoring application for creating and
auditioning JET files. JET is an interactive music player for small embedded
devices, including the Google Android platform. It allows applications to
devices, including the those running the Android platform. It allows applications to
include interactive music soundtracks, in MIDI
format, that respond in real-time to game play events and user interaction.</p>