1.04 uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsStatus LocationSettingsStatus com.google.android.gms.common.api.Status activity ResolutionDialogDismissed(LocationSettingsUpdated As Boolean) StartResolutionDialog 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) void ba anywheresoftware.b4a.BA EventName java.lang.String GetStatusCode Returns the status code that describes whether the location settings meet the location request requirements. int IsInitialized boolean StatusCodes Contains the various StatusCode constants. uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsStatus.StatusCodes uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsStatus.StatusCodes StatusCodes process SETTINGS_CHANGE_UNAVAILABLE 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. int SUCCESS Location settings meet the location request requirements. int RESOLUTION_REQUIRED 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. int uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsStates LocationSettingsStates com.google.android.gms.location.LocationSettingsStates process IsGpsPresent Whether GPS provider is present on the device. boolean IsBlePresent Whether BLE is present on the device. boolean IsNetworkLocationUsable Whether network location provider is enabled and usable by the app. boolean IsInitialized boolean IsNetworkLocationPresent Whether network location provider is present on the device. boolean IsLocationPresent Whether location is present on the device. This method returns true when either GPS or network location provider is present. boolean IsGpsUsable Whether GPS provider is enabled and is usable by the app. boolean IsLocationUsable Whether location is enabled and is usable by the app. This method returns true when either GPS or network location provider is usable. boolean IsBleusable Whether BLE is enabled and is usable by the app. boolean uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsResult LocationSettingsResult com.google.android.gms.location.LocationSettingsResult process IsInitialized boolean GetLocationSettingsStates Returns the location settings states. uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsStates GetLocationSettingsStatus Returns the location settings result status. uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsStatus uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsRequestBuilder LocationSettingsRequestBuilder com.google.android.gms.location.LocationSettingsRequest.Builder process Build Creates a LocationSettingsRequest. com.google.android.gms.location.LocationSettingsRequest SetNeedBle 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. uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsRequestBuilder NeedBle boolean AddLocationRequest Adds one LocationRequest that the client is interested in. This method can be called multiple times if required to add additional location requests. uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsRequestBuilder LocationRequest1 com.google.android.gms.location.LocationRequest SetAlwaysShow 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. uk.co.martinpearman.b4a.fusedlocationprovider.LocationSettingsRequestBuilder AlwaysShow boolean IsInitialized boolean Initialize void uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest LocationRequest com.google.android.gms.location.LocationRequest process SetExpirationTime Set the request expiration time, in millisecond since boot. uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest Millis long SetPriority Set the priority of the request. uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest Priority int IsInitialized boolean SetFastestInterval Explicitly set the fastest interval for location updates, in milliseconds. uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest Millis long Initialize Initialize the LocationRequest with default parameters. Default parameters are for a block accuracy, slowly updated location. void GetNumUpdates Get the number of updates requested. int GetSmallestDisplacement Get the minimum displacement between location updates in meters. By default this is 0. float GetFastestInterval Get the fastest interval of this request, in milliseconds. long GetExpirationTime Get the request expiration time, in milliseconds since boot. long GetPriority Get the quality of the request. int SetSmallestDisplacement Set the minimum displacement between location updates in meters. By default this is 0. uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest SmallestDisplacementMeters float GetInterval Get the desired interval of this request, in milliseconds. long SetInterval Set the desired interval for active location updates, in milliseconds. uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest Millis long SetExpirationDuration Set the duration of this request, in milliseconds. uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest Millis long SetNumUpdates Set the number of location updates. uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest NumUpdates int Priority Contains the various priority constants. uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest.Priority uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest.Priority Priority process PRIORITY_HIGH_ACCURACY Used with SetPriority(Int) to request the most accurate locations available. int PRIORITY_LOW_POWER Used with SetPriority(Int) to request "city" level accuracy. int PRIORITY_NO_POWER Used with SetPriority(Int) to request the best accuracy possible with zero additional power consumption. int PRIORITY_BALANCED_POWER_ACCURACY Used with SetPriority(Int) to request "block" level accuracy. int uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper FusedLocationProvider uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProvider process ConnectionFailed(ConnectionResult1 As Int) ConnectionSuccess ConnectionSuspended(SuspendedCause1 As Int) LocationChanged(Location1 As Location) LocationSettingsChecked(LocationSettingsResult1 As LocationSettingsResult) GetLastKnownLocation 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. anywheresoftware.b4a.gps.LocationWrapper RemoveLocationUpdates Remove all requests for location updates. void Connect Attempt to connect to the Location Services. Will raise either event: ConnectionFailed(ConnectionResult1 As Int) ConnectionSuccess void IsInitialized boolean Initialize Initialize the FusedLocationProvider object. void pBA anywheresoftware.b4a.BA EventName java.lang.String CheckLocationSettings 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) void LocationSettingsRequest1 com.google.android.gms.location.LocationSettingsRequest RequestLocationUpdates Request for location updates. The LocationRequest object defines the criteria for which location updates are requested. void LocationRequest1 com.google.android.gms.location.LocationRequest Disconnect Disconnect from the Location Services. void IsConnecting Returns whether the FusedLocationProvider is trying to connect to the Location Services. boolean IsConnected Returns whether the FusedLocationProvider is connected to the Location Services. boolean ConnectionResult Contains the various ConnectionResult constants. uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper.ConnectionResult SuspendedCause Contains the various SuspendedCause constants. uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper.SuspendedCause uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper.ConnectionResult ConnectionResult process SUCCESS The connection was successful. int INTERNAL_ERROR An internal error occurred. int RESOLUTION_REQUIRED Completing the connection requires some form of resolution. int SERVICE_INVALID The version of the Google Play services installed on this device is not authentic. int CANCELLED The client cancelled the connection by calling Disconnect(). int INVALID_ACCOUNT The client attempted to connect to the service with an invalid account name specified. int DEVELOPER_ERROR The application is misconfigured. int SERVICE_MISSING Google Play services is missing on this device. int LICENSE_CHECK_FAILED The application is not licensed to the user. This error is not recoverable and will be treated as fatal. int NETWORK_ERROR A network error occurred. Retrying should resolve the problem. int SERVICE_DISABLED The installed version of Google Play services has been disabled on this device. int API_UNAVAILABLE One of the API components you attempted to connect to is not available. int SERVICE_VERSION_UPDATE_REQUIRED The installed version of Google Play services is out of date. int SIGN_IN_REQUIRED The client attempted to connect to the service but the user is not signed in. int uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper.SuspendedCause SuspendedCause process CAUSE_NETWORK_LOST A connection suspended cause informing you that a peer device connection was lost. int CAUSE_SERVICE_DISCONNECTED A connection suspended cause informing that the service has been killed. int 1.31 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. Martin Pearman android-support-v4 google-play-services GPS