public static interface

CoreApi.Setup

com.mapsted.positioning.CoreApi.Setup

Class Overview

Access/manage core-related setup

Summary

Public Methods
abstract boolean addLocationServicesListener(CoreApi.LocationServicesCallback listener)
Register a persistent location services listener
abstract boolean areLocationServicesRunning()
Checks whether or not the location services are currently running
abstract CoreParams getCoreParams()
Get the CoreParams that were used for initialization
abstract void initialize(CoreParams params, CoreApi.CoreInitCallback callback)
Initialize method that gets the SDK ready.
abstract boolean isInitialized()
Returns if Mapsted Positioning API is initialized or not.
abstract boolean removeLocationServicesListener(CoreApi.LocationServicesCallback listener)
Unregister a persistent location services listener
abstract void restrictOffPremiseBackgroundLocationScanning(boolean restrict)
Restricts to reduced background location scanning.
abstract void setAppForegroundBackgroundListener(AppForegroundBackgroundListener listener)
set listener to get notified when app moves from foreground to background and viceversa.
abstract void startLocationServices(Context context, CoreApi.LocationServicesCallback callback)
Start location services and foreground service (if not running).
abstract void stopLocationServices(Context context, CoreApi.LocationServicesCallback callback)
Stop location services (if running)
abstract void updateForegroundServiceDetails(MapstedForegroundServiceDetails details)
Update the foreground service details (text, icons, return activity)

Public Methods

public abstract boolean addLocationServicesListener (CoreApi.LocationServicesCallback listener)

Register a persistent location services listener

Parameters
listener the listener
Returns
  • whether or not successfully registered

public abstract boolean areLocationServicesRunning ()

Checks whether or not the location services are currently running

Returns
  • Whether or not the location services are currently running

public abstract CoreParams getCoreParams ()

Get the CoreParams that were used for initialization

Returns
  • The CoreParams that were used for initialization

public abstract void initialize (CoreParams params, CoreApi.CoreInitCallback callback)

Initialize method that gets the SDK ready.

Parameters
params The set of customizable params related to the core-sdk
callback CoreApi.CoreInitCallback Callback to be notified when the SDK initialization is completed.

public abstract boolean isInitialized ()

Returns if Mapsted Positioning API is initialized or not.

Returns
  • A boolean value that indicates if API initialized or not.

public abstract boolean removeLocationServicesListener (CoreApi.LocationServicesCallback listener)

Unregister a persistent location services listener

Parameters
listener the listener
Returns
  • whether or not successfully unregistered

public abstract void restrictOffPremiseBackgroundLocationScanning (boolean restrict)

Restricts to reduced background location scanning. By default this is false (ie no restriction) when it is not explicitly set

public abstract void setAppForegroundBackgroundListener (AppForegroundBackgroundListener listener)

set listener to get notified when app moves from foreground to background and viceversa.

public abstract void startLocationServices (Context context, CoreApi.LocationServicesCallback callback)

Start location services and foreground service (if not running).

Parameters
context the application context
callback the callback reporting whether or not the action was successful

public abstract void stopLocationServices (Context context, CoreApi.LocationServicesCallback callback)

Stop location services (if running)

Parameters
context the application context
callback the callback reporting whether or not the action was successful

public abstract void updateForegroundServiceDetails (MapstedForegroundServiceDetails details)

Update the foreground service details (text, icons, return activity)

Parameters
details the details to update