6. Hack27. 位置情報の取得 LocationManager * implements LocationListener 必須のメソッドは Public Methods abstract void onLocationChanged(Location location) Called when the location has changed. abstract void onProviderDisabled(String provider) Called when the provider is disabled by the user. abstract void onProviderEnabled(String provider) Called when the provider is enabled by the user. abstract void onStatusChanged(String provider, int status, Bundle extras) Called when the provider status changes. 09/19/11
#6: *requestLocationUpdates provider the name of the provider with which to register minTime the minimum time interval for notifications, in milliseconds. This field is only used as a hint to conserve power, and actual time between location updates may be greater or lesser than this value. minDistance the minimum distance interval for notifications, in meters listener a {#link LocationListener} whose onLocationChanged(Location) method will be called for each location update
#7: *requestLocationUpdates provider the name of the provider with which to register minTime the minimum time interval for notifications, in milliseconds. This field is only used as a hint to conserve power, and actual time between location updates may be greater or lesser than this value. minDistance the minimum distance interval for notifications, in meters listener a {#link LocationListener} whose onLocationChanged(Location) method will be called for each location update
#9: ACCURACY に関しては API Level 9 (GingerBread) から 3段階になるようです! Since: API Level 9 a constant indicating a high accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. For horizontal and vertical position this corresponds roughly to an accuracy of less than 100 meters. Constant Value: 3 (0x00000003) public static final int ACCURACY_LOW Since: API Level 9 A constant indicating a low location accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. For horizontal and vertical position this corresponds roughly to an accuracy of greater than 500 meters. Constant Value: 1 (0x00000001) public static final int ACCURACY_MEDIUM Since: API Level 9 A constant indicating a medium accuracy requirement - currently used only for horizontal accuracy. For horizontal position this corresponds roughly to to an accuracy of between 100 and 500 meters. Constant Value: 2 (0x00000002)
#10: ACCURACY に関しては API Level 9 (GingerBread) から 3段階になるようです! Since: API Level 9 a constant indicating a high accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. For horizontal and vertical position this corresponds roughly to an accuracy of less than 100 meters. Constant Value: 3 (0x00000003) public static final int ACCURACY_LOW Since: API Level 9 A constant indicating a low location accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. For horizontal and vertical position this corresponds roughly to an accuracy of greater than 500 meters. Constant Value: 1 (0x00000001) public static final int ACCURACY_MEDIUM Since: API Level 9 A constant indicating a medium accuracy requirement - currently used only for horizontal accuracy. For horizontal position this corresponds roughly to to an accuracy of between 100 and 500 meters. Constant Value: 2 (0x00000002)