| CLASS info |
| public static class LocationResult extends Result |
| Location data information class. |
| Return type | Method name | Description |
| Creator<LocationResult> | CREATOR | LocationResult builder. |
| Return type | Method name |
| static LocationResult | create(List<Location> locations) |
| static LocationResult | extractResult(Intent intent) |
| final Location | getLastLocation() |
| final List<Location> | getLocations() |
| static boolean | hasResult(Intent intent) |
| HWLocation | getLastHWLocation() |
| List<HWLocation> | getHWLocationList() |
| Method |
| public static LocationResult create(List<Location> locations) |
| This API is used to create a LocationResult object for the given location. |
Parameters
| Parameter name | Parameter desc |
| locations | Location list. |
Return
| type | desc |
| LocationResult | LocationResult object. |
| Method |
| public static LocationResult extractResult(Intent intent) |
| This API is used to extract LocationResult from Intent. |
Parameters
| Parameter name | Parameter desc |
| intent | Intent transferred to the server when the requestLocationUpdates API is called. |
Return
| type | desc |
| LocationResult | This parameter returns the location result if the Intent contains LocationResult, or null if the Intent does not contain LocationResult. |
| Method |
| public final Location getLastLocation() |
| This API is used to obtain the latest available location. If no location is available, null is returned. |
Return
| type | desc |
| Location | Latest available location. If no location is available, null is returned. This class is native to Android.For details, please refer to the Android development documentation. |
| Method |
| public List<Location> getLocations() |
| This API is used to obtain the list of available locations. |
Return
| type | desc |
| List<Location> | Available locations, which are ordered from oldest to newest. |
| Method |
| public static boolean hasResult(Intent intent) |
| This API returns true if an Intent contains the LocationResult object. |
Parameters
| Parameter name | Parameter desc |
| intent | Intent transferred to the server when the requestLocationUpdates API is called. |
Return
| type | desc |
| boolean | If the Intent contains LocationResult, the value is true. Otherwise, the value is false. |
| Method |
| public final HWLocation getLastHWLocation() |
This API is used to obtain the available location of the last request, including the detailed address information. |
Return
| type | desc |
| HWLocation | Available location of the last request, including the detailed address information. If no location is available, null is returned. |
| Method |
| public final List<HWLocation> getHWLocationList() |
| This API is used to obtain the list of available locations, including the detailed address information. |
Return
| type | desc |
| List<HWLocation> | List of available locations sorted from oldest to newest, including the detailed address information. If no location is available, null is returned. |