IAGSManager

class IAGSManager: Any

The shared singleton session object. To get started, you must set API key and secret key to SDK. You must add IAGSApiKey and IAGSSecretKey to meta-data in manifest.

or write the following codes: IAGSManager.getInstance(context).setApiKey("SET YOUR API KEY HERE", "SET YOUR SECRET KEY HERE")

Fields

Name Description
val extraInfo: IAExtraInfo?

Methods

setApiKey

fun setApiKey(apiKey: String, apiSecret: String)

Set your API key and Secret key for SDK, this must be same as IndoorAtlas provided keys

Parameters

Name Description
apiKey: String

API Key for access the service

apiSecret: String

API secret key for access the service

ReturnValue

Name Description
Unit

addGroundSageListener

fun addGroundSageListener(listener: IAGSManagerListener)

Register listener to GroundSage instances

Parameters

Name Description
listener: IAGSManagerListener

GroundSage listener

ReturnValue

Name Description
Unit

removeGroundSageListener

fun removeGroundSageListener(listener: IAGSManagerListener)

Unregister listener to GroundSage instances

Parameters

Name Description
listener: IAGSManagerListener

GroundSage listener

ReturnValue

Name Description
Unit

registerLocationListener

fun registerLocationListener(listener: IALocationListener)

Register listener to GroundSage instances

Parameters

Name Description
listener: IALocationListener

GroundSage listener

ReturnValue

Name Description
Unit

unregisterLocationListener

fun unregisterLocationListener(listener: IALocationListener)

Unregister listener to GroundSage instances

Parameters

Name Description
listener: IALocationListener

GroundSage listener

ReturnValue

Name Description
Unit

registerRegionListener

fun registerRegionListener(listener: IARegion.Listener)

Register listener to GroundSage instances

Parameters

Name Description
listener: IARegion.Listener

GroundSage listener

ReturnValue

Name Description
Unit

unregisterRegionListener

fun unregisterRegionListener(listener: IARegion.Listener)

Unregister listener to GroundSage instances

Parameters

Name Description
listener: IARegion.Listener

GroundSage listener

ReturnValue

Name Description
Unit

startSubscription

fun startSubscription()

Start to subscribe the service. SDK will broadcast an event when user entered the specified region.

ReturnValue

Name Description
Unit

stopSubscription

fun stopSubscription()

Stop to subscribe the service

ReturnValue

Name Description
Unit

requestVenueInfo

fun requestVenueInfo(completionHandler: (Array<IAGSVenue>?, Exception?)->Unit?)

Request map detail from server

Parameters

Name Description
completionHandler: (Array<IAGSVenue>?, Exception?)->Unit?

A closure which is called with map detail and error if any

ReturnValue

Name Description
Unit

requestWayfindingUpdates

fun requestWayfindingUpdates(request: IAWayfindingRequest, listener: IAWayfindingListener)

Start requesting wayfinding updates.

Parameters

Name Description
request: IAWayfindingRequest

Wayfinding request

listener: IAWayfindingListener

a IAWayfindingListener object to register

ReturnValue

Name Description
Unit

requestWayfindingUpdates

fun requestWayfindingUpdates(request: IAWayfindingRequest, listener: IAWayfindingListener, looper: Looper)

Start requesting wayfinding updates.

Parameters

Name Description
request: IAWayfindingRequest

Wayfinding request

listener: IAWayfindingListener

a IAWayfindingListener object to register

looper: Looper

a looper who's callback mechanism will be used to deliver callbacks

ReturnValue

Name Description
Unit

requestWayfindingUpdates

fun requestWayfindingUpdates(request: IAWayfindingRequest, pendingIntent: PendingIntent)

Start requesting wayfinding updates.

Please see in the Android documentation how to configure the PendingIntent.

Parameters

Name Description
request: IAWayfindingRequest

Wayfinding request

pendingIntent: PendingIntent

a IAWayfindingListener object to register Request wayfinding updates that are delivered to an application component specified by a PendingIntent. The wayfinding update is in the extras of the Intent. Use IARoute.from(Intent) to obtain the update.

ReturnValue

Name Description
Unit

removeWayfindingUpdates

fun removeWayfindingUpdates()

Removes wayfinding request.

ReturnValue

Name Description
Unit

removeWayfindingUpdates

fun removeWayfindingUpdates(pendingIntent: PendingIntent)

Removes all updates for the specific pendingIntent. After call to this method, wayfinding events will no longer be delivered to the application component.

Parameters

Name Description
pendingIntent: PendingIntent

a PendingIntent that will no longer need wayfinding events.

ReturnValue

Name Description
Unit

requestWayfindingRoute

fun requestWayfindingRoute(from: IALatLngFloorCompatible, to: IALatLngFloorCompatible, listener: IAWayfindingListener)

Request a single-shot wayfinding route.

Parameters

Name Description
from: IALatLngFloorCompatible

Wayfinding starting location

to: IALatLngFloorCompatible

Wayfinding destination

listener: IAWayfindingListener

a IAWayfindingListener listener to provide route to

ReturnValue

Name Description
Unit

addGeofences

fun addGeofences(request: IAGeofenceRequest, listener: IAGeofenceListener)

Register for geofence event updates using listener.

Parameters

Name Description
request: IAGeofenceRequest
listener: IAGeofenceListener

a IAGeofenceRequest object to register

ReturnValue

Name Description
Unit

addGeofences

fun addGeofences(request: IAGeofenceRequest, listener: IAGeofenceListener, looper: Looper)

Register for geofence event updates using listener.

Parameters

Name Description
request: IAGeofenceRequest

Geofence request

listener: IAGeofenceListener

a IAGeofenceListener whose IAGeofenceListener.onGeofencesTriggered will be invoked on each update. Invocations are made in the main thread.

looper: Looper

a looper who's callback mechanism will be used to deliver callbacks

ReturnValue

Name Description
Unit

addGeofences

fun addGeofences(request: IAGeofenceRequest, pendingIntent: PendingIntent)

Request geofence events that are delivered to an application component specified by a PendingIntent. The geofence event is in the extras of the Intent. Use IAGeofenceEvent.from(Intent) to obtain the geofence event.

Please see in the Android documentation how to configure the PendingIntent.

Parameters

Name Description
request: IAGeofenceRequest

Geofence request

pendingIntent: PendingIntent

specifies what component is notified with geofence events

ReturnValue

Name Description
Unit

removeGeofenceUpdates

fun removeGeofenceUpdates(listener: IAGeofenceListener): Boolean

Removes all updates for the specific listener. After calling this method, updates will no longer be delivered to the listener.

Parameters

Name Description
listener: IAGeofenceListener

a listener object that will no longer need location updates

ReturnValue

Name Description
Boolean

if listener was registered and is now removed, otherwise false.

removeGeofenceUpdates

fun removeGeofenceUpdates(pendingIntent: PendingIntent)

Removes all updates for the specific pendingIntent. After calling this method, geofence events will no longer be delivered to the application component.

Parameters

Name Description
pendingIntent: PendingIntent

a PendingIntent that will no longer need geofence events.

ReturnValue

Name Description
Unit

removeGeofences

fun removeGeofences(geofenceRequestIds: List<String>)

Remove geofences from monitoring.

Parameters

Name Description
geofenceRequestIds: List<String>

ReturnValue

Name Description
Unit

registerOrientationListener

fun registerOrientationListener(request: IAOrientationRequest, listener: IAOrientationListener)

Add a listener for device heading and orientation.Heading and orientation updates are not given unless positioning is started with IALocationManager.requestLocationUpdates The sensitivity of updates is configured using IAOrientationRequest. It is possible to receive more frequent updates than specified in the request if there are multiple listeners. The returned orientation represents the current best estimate and can exhibit sudden jumps. The orientation should be be filtered if used in e.g. virtual reality applications.

Parameters

Name Description
request: IAOrientationRequest

Request indicating sensitivity

listener: IAOrientationListener

IAOrientationListener object to register

ReturnValue

Name Description
Unit

unregisterOrientationListener

fun unregisterOrientationListener(listener: IAOrientationListener): Boolean

Remove orientation listener.

Parameters

Name Description
listener: IAOrientationListener

a IAOrientationListener object to be removed

ReturnValue

Name Description
Boolean

true if listener was successfully unregistered, false if it was not found.

setLocation

fun setLocation(location: IALocation)

See {@link #lockFloor(int)} for restricting the positioning to a certain floor level.

Parameters

Name Description
location: IALocation

location indicating current position

ReturnValue

Name Description
Unit

onLocationChanged

fun onLocationChanged(location: IALocation?)

Parameters

Name Description
location: IALocation?

ReturnValue

Name Description
Unit

onStatusChanged

fun onStatusChanged(provider: String?, status: Int, extras: Bundle?)

Parameters

Name Description
provider: String?
status: Int
extras: Bundle?

ReturnValue

Name Description
Unit

onEnterRegion

fun onEnterRegion(region: IARegion?)

Parameters

Name Description
region: IARegion?

ReturnValue

Name Description
Unit

onExitRegion

fun onExitRegion(region: IARegion?)

Parameters

Name Description
region: IARegion?

ReturnValue

Name Description
Unit

CompanionObject

IAGSManager

class IAGSManager: Any

The shared singleton session object. To get started, you must set API key and secret key to SDK. You must add IAGSApiKey and IAGSSecretKey to meta-data in manifest.

or write the following codes: IAGSManager.getInstance(context).setApiKey("SET YOUR API KEY HERE", "SET YOUR SECRET KEY HERE")

Fields

Name Description
val version: BuildConfig.GROUNDSAGE_SDK_VERSION

Methods

getInstance

fun getInstance(context: Context): IAGSManager

Parameters

Name Description
context: Context

ReturnValue

Name Description
IAGSManager