android development introduction chương 24 android location based services

62 337 0
android development introduction chương 24 android location based services

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

  24         !"  #$%& &"' ()!&&%&''%  ***    * !" "&%"+"       Examples • )+"+'++'%"+++ • ,%('%-.-. • ()'"+%%&       /(0,'&#0,$1)2 3Global Posioning System#0,$% 45 '# %$ &6&' &+"" 5%*+777 +777 " ('"8+777#89+*77)$+)' 3'&+&(5+ 0,:;+<'""+"%"(3 trilateraon  =%(">()''' ???    ? /(0,'&#0,$1)2 2-D Trilateraon !'&"(6&"3@3A %(+&""&" (&"A"<%&)+B2B/&+B !"C A")&(&"+&+B#$%%B(&"( A"()(&""%( !%&"&!'()+&"%A"()( & (&" +D 3() +(+ "&":'(spheres%  =%(">()''' EEE    E /(0,'&#0,$1)23  F 849?) D8G4) '8?8) H+D= 444    4 * 3 =<&"0,. I"(">()'''  =%(">()''' GGG    G * 3 =<&"0,. I"(">()'''  =%(">()''' 999    9 * 3 =<&"0,. I"(">()'''  =%(">()''' 878787    87 D3(3'" %&( *% "" ( ( ('') J" 3 F  =%'  '" "&      8497 [...]... 18 24 Android - Location Services Location Services LocationListener Class Used for receiving notifications from the LocationManager when the location has changed These methods are called if the LocationListener has been registered with the location manager service using the method: requestLocationUpdates (Provider, minTime, minDistance, LocationListener) 19 24 Android - Location Services Location Services. . .24 Android - Location Services Location Services Latitude & Longitude Latitude in GPS-Decimal notation: +90.00000 (North) Longitude GPS-Decimal notation: +180.000000 (East) to to -90.000000 (South) -180.000000 (West) 11 24 Android - Location Services Location Services Android Location Classes The Android API provides Location data based on a variety of methods including:... 34 24 Android - Location Services Location Services Example – Obtain Location from GPS Main Activity: MyGpsService // This is the GPS service Requests location updates // in a parallel thread sends broadcast using filter package cis493.mappinggps; import android. app.Service; import android. content.Context; import android. content.Intent; import android. location. Location; import android. location. LocationListener;... emulator (5556) 25 24 Android - Location Services Location Services Example – Obtain Location from GPS Layout Emulator Control panel to enter test data reflecting Latitude and Longitude... import android. location. LocationManager; import android. os.Bundle; import android. os.IBinder; import android. os.Looper; import android. util.Log; import android. widget.Toast; public class MyGpsService extends Service { String GPS_FILTER = "cis493.action.GPS _LOCATION" ; Thread triggerService; LocationManager lm; GPSListener myLocationListener; boolean isRunning = true; 35 24 Android - Location Services Location. .. This class represents the current state of the GPS engine Location A class representing a geographic location sensed at a particular time (a "fix") LocationManager This class provides access to the system location services LocationProvider An abstract superclass for location providers 13 24 Android - Location Services Location Services Android Location Interfaces GpsStatus.Listener Used for receiving... 27 24 Android - Location Services Location Services Example – Obtain Location from GPS Main Activity: MyGPS // Request GPS location, show lat... android: layout_width="fill_parent" android: layout_height="120px" android: textSize="12sp" > 26 24 Android - Location Services Location Services Example – Obtain Location from GPS Manifest . of the GPS engine. Location getLastKnownLocation (String provider) Returns a Location indicating the data from the last known location fix obtained from the given provider. LocationProvider getProvider.   7 LocaonListener Class – Useful Methods  abstract void onLocationChanged (Location location) Called when the location has changed. abstract void onProviderDisabled (String provider). the location provider of the given name, or null if no provider exists by that name. List<String> getProviders (Criteria criteria, boolean enabledOnly) Returns a list of the names of LocationProviders

Ngày đăng: 23/10/2014, 08:56

Từ khóa liên quan

Mục lục

  • Slide 1

  • Slide 2

  • Slide 3

  • Slide 4

  • Slide 5

  • Slide 6

  • Slide 7

  • Slide 8

  • Slide 9

  • Slide 10

  • Slide 11

  • Slide 12

  • Slide 13

  • Slide 14

  • Slide 15

  • Slide 16

  • Slide 17

  • Slide 18

  • Slide 19

  • Slide 20

Tài liệu cùng người dùng

Tài liệu liên quan