BrazeInternalLocationApi

An implementation of the location calls so that they are contained in a single, external module that clients don't need to include if they don't want location services.

Constructors

Link copied to clipboard

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Returns the last known location from the LocationManager.GPS_PROVIDER, if not older than LAST_KNOWN_GPS_LOCATION_MAX_AGE_MS. Assumes that the Manifest.permission.ACCESS_FINE_LOCATION permission is present.

Link copied to clipboard
fun getSuitableLocationProvider(locationManager: LocationManager, allowedProviders: EnumSet<LocationProviderName>, hasFinePermission: Boolean, hasCoarsePermission: Boolean): String?

Determines the best location provider based on the permissions and list of providers allowed.

Link copied to clipboard
open override fun initWithContext(context: Context, allowedProviders: EnumSet<LocationProviderName>, appConfigurationProvider: BrazeConfigurationProvider)

Initialize the object with some external variables. This function should be called immediately after the object is created and should be called only once.

Link copied to clipboard
open override fun requestSingleLocationUpdate(manualLocationUpdateCallback: (location: IBrazeLocation) -> Unit): Boolean

Requests a location fix for the session on the device.