Utility methods

Last updated 21 days ago

Initializing HyperTrack

RNHyperTrack.initialize(String key);

Parameter

Type

Description

key

String

publishable key

Pause Tracking

The app automatically starts tracking location when we open the app. To stop tracking use the following method

RNHyperTrack.stopTracking();

Resume Tracking

RNHyperTrack.resumeTracking();

Get Device Id

Get the unique device identifier for device.

RNHyperTrack.getDeviceId();

Parameter

Type

promise

Promise

Returns

Description

device id

returns a unique identifier for device

Check Location Permission

RNHyperTrack.checkLocationPermission();

Parameter

Type

promise

Promise

Returns

Description

Boolean

true if location permission is on otherwise false

Request Location Permission

RNHyperTrack.requestLocationPermission();

Parameter

Type

promise

Promise

Return

Description

Boolean

true if location permission is given otherwise false

Check Activity Permission

Get motion permission for iOS

RNHyperTrack.checkActivityPermission();

Parameter

Type

promise

Promise

Return

Description

Boolean

returns true if permission present otherwise false

Request Activity Permission

Request motion permission for iOS

RNHyperTrack.requestActivityPermission()

Parameter

Type

promise

Promise

Return

Description

Boolean

returns true if permission granted otherwise false

Set name and metadata

RNHyperTrack.setDevice(String name , Object metadata)

Parameter

Type

Description

name

String

name of the user

metadata

Object

key value pairs of metadata