Press on the image to return to the main documentation page.
FusedLocationProvider
Written by Martin Pearman
The FusedLocationProvider intelligently manages the underlying location technology and gives you the best location according to your needs. https://developer.android.com/google/play-services/location.html This library depends on the Google Play Services library, android-support-v4 library and the GPS library. The GPS library is required in order to use it's Location object.
ConnectionFailed(ConnectionResult1 As Int) ConnectionSuccess ConnectionSuspended(SuspendedCause1 As Int) LocationChanged(Location1 As Location) LocationSettingsChecked(LocationSettingsResult1 As LocationSettingsResult)
Checks if the relevant system settings are enabled on the device to carry out the desired location requests. Raises the event: LocationSettingsChecked(LocationSettingsResult1 As LocationSettingsResult)
Connect
Attempt to connect to the Location Services. Will raise either event: ConnectionFailed(ConnectionResult1 As Int) ConnectionSuccess
ConnectionResultAsConnectionResult
Contains the various ConnectionResult constants.
Disconnect
Disconnect from the Location Services.
GetLastKnownLocationAsLocationWrapper
Returns the best most recent location currently available. Can only be called if the FusedLocationProvider is connected. The returned Location object will not be initialized if no last known location is available.
Initialize (EventNameAsString)
Initialize the FusedLocationProvider object.
IsConnectedAsBoolean
Returns whether the FusedLocationProvider is connected to the Location Services.
IsConnectingAsBoolean
Returns whether the FusedLocationProvider is trying to connect to the Location Services.
Always show the dialog, without the "Never" option to suppress future dialogs from this app. When this flag is set to true, the dialog will show up if the location settings do not satisfy the request, even if a user has previously chosen "Never". NOTE: Only use this method if your dialog is the result of an explicit user-initiated action that requires location to proceed. Cancelling this dialog should also cancel the initiated action.
Sets whether the client wants BLE scan to be enabled. When this flag is set to true, if the platform supports BLE scan mode and Bluetooth is off, the dialog will prompt the user to enable BLE scan. If the platform doesn't support BLE scan mode, the dialog will prompt to enable Bluetooth.
Returns the status code that describes whether the location settings meet the location request requirements.
IsInitializedAsBoolean
StartResolutionDialog (EventNameAsString)
Starts the resolution dialog. The user can then enable the location settings required to meet the location request requirements. This method must be called from an Activity. Raises the event: ResolutionDialogDismissed(LocationSettingsUpdated As Boolean)
Location settings do not meet the location request requirements. Location settings can be changed to meet the location request requirements. A resolution dialog is available.
SETTINGS_CHANGE_UNAVAILABLEAsInt
Location settings do not meet the location request requirements. Location settings can't be changed to meet the location request requirements. No resolution dialog is available.
SUCCESSAsInt
Location settings meet the location request requirements.