目录

CLASS info
public class HWLocation extends LocationBaseResponse implements Parcelable
Location information, including the address.

Public Method Summary

Return typeMethod name
doublegetLatitude()
doublegetLongitude()
doublegetAltitude()
floatgetSpeed()
floatgetBearing()
floatgetAccuracy()
floatgetVerticalAccuracyMeters()
floatgetSpeedAccuracyMetersPerSecond()
floatgetBearingAccuracyDegrees()
StringgetProvider()
longgetTime()
longgetElapsedRealtimeNanos()
StringgetCountryCode()
StringgetCountryName()
StringgetState()
StringgetCity()
StringgetCounty()
StringgetStreet()
StringgetFeatureName()
StringgetPostalCode()
StringgetPhone()
StringgetUrl()
MapgetExtraInfo()

Public Methods

Method

public double getLatitude()

This API is used to obtain the latitude of a location.

Return

typedesc
doubleLatitude of a location. If no latitude is available, 0.0 is returned.
Method
public double getLongitude()
This API is used to obtain the longitude of a location.

Return

typedesc
doubleLongitude of a location. If no longitude is available, 0.0 is returned.
Method
public double getAltitude()
This API is used to obtain the altitude of a location.

Return

typedesc
doubleAltitude of a location. If no altitude is available, 0.0 is returned.
Method
public float getSpeed()
This API is used to obtain the speed of a device at the current location, in meters per second.

Return

typedesc
floatSpeed of a device at the current location, in meters per second. If no speed is available, 0.0 is returned.
Method
public float getBearing()
This API is used to obtain the bearing of a device at the current location, in degrees.

Return

typedesc
floatBearing of a device at the current location, in degrees. If no bearing is available, 0.0 is returned.
Method
public float getAccuracy()
This API is used to obtain the horizontal error of a location, in meters.

Return

typedesc
floatHorizontal error of a location, in meters. If no horizontal error is available, 0.0 is returned.
Method
public float getVerticalAccuracyMeters()
This API is used to obtain the vertical error of a location, in meters.

Return

typedesc
floatVertical error of a location, in meters. If no vertical error is available, 0.0 is returned.
Method
public float getSpeedAccuracyMetersPerSecond()
This API is used to obtain the speed error of a device at the current location, in meters per second.

Return

typedesc
floatSpeed error of a device at the current location, in meters per second. If no speed error is available, 0.0 is returned.
Method
public float getBearingAccuracyDegrees()
This API is used to obtain the bearing error of a device at the current location, in degrees.

Return

typedesc
floatBearing error of the current location, in degrees. If no bearing error is available, 0.0 is returned.
Method
public String getProvider()
This API is used to obtain the location provider, such as the network location, GPS, Wi-Fi, and Bluetooth.

Return

typedesc
StringLocation provider, such as network location, GPS, Wi-Fi, and Bluetooth. If no location provider is available, null is returned.
Method
public long getTime()
This API is used to obtain the current timestamp, in milliseconds.

Return

typedesc
longCurrent timestamp, in milliseconds.
Method
public long getElapsedRealtimeNanos()
This API is used to obtain the time elapsed since the system was started, in nanoseconds.

Return

typedesc
longTime elapsed since the system was started, in nanoseconds
Method
public String getCountryCode()
This API is used to obtain the country code of the current location. The value is a two-letter code complying with the ISO 3166-1 standard.

Return

typedesc
StringCountry code. The value is a two-letter code complying with the ISO 3166-1 standard. If no country code is available, null is returned.
Method
public String getCountryName()
This API is used to obtain the country name of the current location.

Return

typedesc
StringCountry name. If no country name is available, null is returned.
Method
public String getState()
This API is used to obtain the administrative region of the current location.

Return

typedesc
StringAdministrative region. If no administrative region is available, null is returned.
Method
public String getCity()
This API is used to obtain the city of the current location.

Return

typedesc
StringCity of the current location. If no city is available, null is returned.
Method
public String getCounty()
This API is used to obtain the county of the current location.

Return

typedesc
StringCounty of the current location. If no county is available, null is returned.
Method
public String getStreet()
This API is used to obtain the street of the current location.

Return

typedesc
StringStreet of the current location. If no street is available, null is returned.
Method
public String getFeatureName()
This API is used to obtain the landmark building at the current location.

Return

typedesc
StringLandmark building at the current location. If no landmark building is available, null is returned.
Method
public String getPostalCode()
This API is used to obtain the postal code of the current location.

Return

typedesc
StringPostal code of the current location. If no postal code is available, null is returned.
Method
public String getPhone()
This API is used to obtain the phone number of the landmark building (such as a store or company) at the current location.

Return

typedesc
StringPhone number of the landmark building (such as a store or company) at the current location. If no phone number is available, null is returned.
Method
public String getUrl()
This API is used to obtain the website of the landmark building (such as a store or company) at the current location.

Return

typedesc
StringWebsite of the landmark building (such as a store or company) at the current location. If no website is available, null is returned.
Method
public Map<String, Object> getExtraInfo()
This API is used to obtain additional information.

Return

typedesc
Map<String, Object>Additional information, which is a key-value pair. If no additional information is available, null is returned.