2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
3 <!-- This component and the accompanying materials are made available under the terms of the License |
3 <!-- This component and the accompanying materials are made available under the terms of the License |
4 "Eclipse Public License v1.0" which accompanies this distribution, |
4 "Eclipse Public License v1.0" which accompanies this distribution, |
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
6 <!-- Initial Contributors: |
6 <!-- Initial Contributors: |
7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="GUID-A996FAAF-DB18-4F78-A8DA-873ACD771560" xml:lang="en"><title>Finding |
9 --> |
10 the location of a mobile device</title><prolog><metadata><keywords></keywords></metadata></prolog><conbody> |
10 <!DOCTYPE concept |
11 <p>The Location |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 Acquisition API allows applications to access the <xref href="GUID-BC8D1F02-3FBB-406A-80CE-5836E61EBD82.dita">location |
12 <concept id="GUID-A996FAAF-DB18-4F78-A8DA-873ACD771560" xml:lang="en"><title>Finding |
13 information</xref> of a mobile device regardless of the <xref href="GUID-647F0CA5-5568-4C72-9CB5-C8CBF09B4B4B.dita">location |
13 the location of a mobile device</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>The Location Acquisition API allows applications to access the <xref href="GUID-BC8D1F02-3FBB-406A-80CE-5836E61EBD82.dita">location information</xref> of |
|
15 a mobile device regardless of the <xref href="GUID-647F0CA5-5568-4C72-9CB5-C8CBF09B4B4B.dita">location |
14 technology</xref> used. </p> |
16 technology</xref> used. </p> |
15 <p>Typical use cases include:</p> |
17 <p>Typical use cases include:</p> |
16 <ul> |
18 <ul> |
17 <li><p>Finding the location of a mobile device by using the Global |
19 <li><p>Finding the location of a mobile device by using the Global |
18 Positioning System (GPS).</p></li> |
20 Positioning System (GPS).</p></li> |
19 <li><p>Finding the location of a mobile device by network based |
21 <li><p>Finding the location of a mobile device by network based |
20 positioning.</p></li> |
22 positioning.</p></li> |
21 <li><p>Basic calculations using location information such as distances, |
23 <li><p>Basic calculations using location information such as distances, |
22 bearing, and timestamp (see <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classTPosition.html" format="application/java-archive"><codeph>TPosition</codeph></xref> and Extended |
24 bearing, and timestamp (see <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classTPosition.html" format="application/java-archive"><codeph>TPosition</codeph></xref> and |
23 location information)</p></li> |
25 Extended location information).</p></li> |
24 </ul> |
26 </ul> |
25 <p>Important implementation considerations include:</p> |
27 <p>Important implementation considerations include:</p> |
26 <ul> |
28 <ul> |
27 <li><p>Applications should close their <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classRPositioner.html" format="application/java-archive"><codeph>RPositioner</codeph></xref> when |
29 <li><p>Applications should close their <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classRPositioner.html" format="application/java-archive"><codeph>RPositioner</codeph></xref> when |
28 they do not need positioning for an extended period of time. Also, when staying |
30 they do not need positioning for an extended period of time. Also, when staying |
44 <section id="GUID-7BB06E28-B1A5-4CBB-95B3-6F5735F945A6"><title>Getting the location |
46 <section id="GUID-7BB06E28-B1A5-4CBB-95B3-6F5735F945A6"><title>Getting the location |
45 of a device</title> |
47 of a device</title> |
46 <p>To find the location of a mobile device:</p> |
48 <p>To find the location of a mobile device:</p> |
47 <ol> |
49 <ol> |
48 <li id="GUID-21F99413-A2DC-4588-856B-292FF3C0F6D4"><p>Use the methods |
50 <li id="GUID-21F99413-A2DC-4588-856B-292FF3C0F6D4"><p>Use the methods |
49 of the Location |
51 of the Location Acquisition API to construct your application. </p> |
50 Acquisition API to construct your application. </p> |
|
51 <itemgroup> |
52 <itemgroup> |
52 <p>The <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classRPositionServer.html" format="application/java-archive"><codeph>RPositionServer</codeph></xref> and <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classRPositioner.html" format="application/java-archive"><codeph>RPositioner</codeph></xref> classes |
53 <p>The <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classRPositionServer.html" format="application/java-archive"><codeph>RPositionServer</codeph></xref> and <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classRPositioner.html" format="application/java-archive"><codeph>RPositioner</codeph></xref> classes |
53 are particularly relevant in getting the location of your device, which is |
54 are particularly relevant in getting the location of your device, which is |
54 typically stored in the <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classTPositionInfo.html" format="application/java-archive"><codeph>TPositionInfo</codeph></xref> class.</p> |
55 typically stored in the <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classTPositionInfo.html" format="application/java-archive"><codeph>TPositionInfo</codeph></xref> class.</p> |
55 <p>For information on some detailed uses of the API, see the Location Acquisition |
56 <p>For information on some detailed uses of the API, see the Location Acquisition |
56 API Usage section for:</p> |
57 API Usage section for:</p> |
57 <ul> |
58 <ul> |
58 <li><p> list of the steps required |
59 <li><p>a list of the steps required for finding the location of |
59 for finding the location of a mobile device in a basic use case</p></li> |
60 a mobile device in a basic use case</p></li> |
60 <li><p>how to obtain the current location estimate</p> |
61 <li><p>how to obtain the current location estimate</p></li> |
61 </li> |
62 <li><p>how to obtain an extended location estimate, including information |
62 <li><p>how to obtain an extended location estimate, |
63 such as bearing, speed, and available satellites, which is not normally returned |
63 including information such as bearing, speed, and available satellites, which |
64 with the current location estimate</p></li> |
64 is not normally returned with the current location estimate</p></li> |
65 <li><p>how to obtain your last known position information, using |
65 <li><p>how to obtain your last known position |
66 cached information if available. This means that this method does not retrieve |
66 information, using cached information if available. This means |
67 the location information from the underlying positioning methods.</p></li> |
67 that this method does not retrieve the location information from the underlying |
|
68 positioning methods.</p></li> |
|
69 </ul> |
68 </ul> |
70 </itemgroup> |
69 </itemgroup> |
71 </li> |
70 </li> |
72 <li id="GUID-AC8282F7-4916-4364-960A-0217659C57DD"><p>Make sure <codeph>lbs.lib</codeph> is |
71 <li id="GUID-AC8282F7-4916-4364-960A-0217659C57DD"><p>Make sure <codeph>lbs.lib</codeph> is |
73 accessible to your linker when compiling your application by including it |
72 accessible to your linker when compiling your application by including it |
81 </section> |
80 </section> |
82 <section id="GUID-3D55E67C-8A43-4214-AB1C-0924285B6DA3"><title>Additional information |
81 <section id="GUID-3D55E67C-8A43-4214-AB1C-0924285B6DA3"><title>Additional information |
83 on locating your device</title> |
82 on locating your device</title> |
84 <p>For more information, see:</p> |
83 <p>For more information, see:</p> |
85 <ul> |
84 <ul> |
86 <li><p>The purpose and general overview of |
85 <li><p>The purpose and general overview of the Location Acquisition |
87 the Location Acquisition API.</p></li> |
86 API.</p></li> |
88 <li><p>description and class structure of |
87 <li><p>The description and class structure of the API.</p></li> |
89 the API.</p></li> |
88 <li><p>A general overview on how to create applications using the |
90 <li><p>a general overview on how to create applications using |
89 API.</p></li> |
91 the API.</p></li> |
90 <li><p>The <codeph>LocationRefAppForS60</codeph> in the SDK (<codeph><SDK |
92 <li><p>for an example of how to use the Location Acquisition API, |
91 installation directory>\S60CppExamples\AutoAdaptedToTouchEx</codeph>), for |
93 see the <codeph>LocationRefAppForS60</codeph> in the SDK (<codeph><SDK |
92 an example of how to use the Location Acquisition API.</p></li> |
94 installation directory>\S60CppExamples\AutoAdaptedToTouchEx</codeph>).</p> |
|
95 </li> |
|
96 </ul> |
93 </ul> |
97 </section> |
94 </section> |
98 <section id="GUID-94FC6381-CDB3-4F70-B3F5-66D450F827EC"><title>Related APIs</title> |
95 <section id="GUID-94FC6381-CDB3-4F70-B3F5-66D450F827EC"><title>Related APIs</title> |
99 <p>The Symbian platform also offers the following related |
96 <p>The Symbian platform also offers the following related services:</p> |
100 services:</p> |
|
101 <ul> |
97 <ul> |
102 <li><p>EXIF API</p> |
98 <li><p><xref format="html" href="specs/guides/Exif_API_Specification/Exif_API_Specification.html" scope="external">EXIF |
|
99 API</xref></p> |
103 <itemgroup> |
100 <itemgroup> |
104 <p>Allows you to include data, such as location information, in image files.</p> |
101 <p>Allows you to include data, such as location information, in image files.</p> |
105 </itemgroup> |
102 </itemgroup> |
106 </li> |
103 </li> |
107 <li><p>Landmarks API</p> |
104 <li><p><xref format="html" href="specs/guides/Landmarks_API_Specification/Landmarks_API_Specification.html" scope="external">Landmarks |
|
105 API</xref></p> |
108 <itemgroup> |
106 <itemgroup> |
109 <p>Allows you to <xref href="GUID-DF756D6C-1E03-4EC0-B074-09611D122359.dita">store |
107 <p>Allows you to <xref href="GUID-DF756D6C-1E03-4EC0-B074-09611D122359.dita">store |
110 location information on your mobile device</xref>.</p> |
108 location information on your mobile device</xref>.</p> |
111 </itemgroup> |
109 </itemgroup> |
112 </li> |
110 </li> |