Static Private locateStatic addOrder handle
Order status
Geotag data JSON
current location if success or LocationError if failure
Adds a new geotag with expected location. Check Shift tracking and Clock In/Out tagging docs to learn how to use Order handle and Order status params.
Order handle
Order status
Geotag data JSON
Expected location
location with deviation if success or LocationError if failure
Geotag data JSON
current location if success or LocationError if failure
Adds a new geotag
Geotag data JSON
Expected location
location with deviation if success or LocationError if failure
Adds a new geotag with expected location
Static getStatic getStatic getStatic getReturns a list of errors that blocks SDK from tracking
List of errors
Static getStatic getStatic getReflects the current location of the user or an outage reason
Static getStatic getStatic getStatic getA primary identifier that uniquely identifies the worker outside of HyperTrack. Example: email, phone number, database id It is usually obtained and set when the worker logs into the app. Set it to an empty string "" when the worker logs out of the app to un-bind the device from the worker and avoid unintentional tracking.
Static locateRequests one-time location update and returns the location once it is available, or error.
Only one locate subscription can be active at a time. If you re-subscribe, the old EmitterSubscription will be automaticaly removed.
This method will start location tracking if called, and will stop it when the location is received or
the subscription is cancelled. If any other tracking intent is present (e.g. isAvailable is set to true),
the tracking will not be stopped.
EmitterSubscription
const subscription = HyperTrack.locate(location => {
...
})
// to unsubscribe
subscription.remove()
Static setAllows mocking location data.
Check the Test with mock locations guide for more information.
To avoid issues related to race conditions in your code use this API only if modifying the compiled HyperTrackAllowMockLocation AndroidManifest.xml/Info.plist value is insufficient for your needs.
Example: if for some reason you aren't able to recompile with HyperTrackAllowMockLocation set to YES/true for your prod app QA mock location tests and need to set up the value in runtime.
Static setStatic setStatic setStatic setStatic setStatic setA primary identifier that uniquely identifies the worker outside of HyperTrack. Example: email, phone number, database id It is usually obtained and set when the worker logs into the app. Set it to an empty string "" when the worker logs out of the app to un-bind the device from the worker and avoid unintentional tracking.
Static subscribeSubscribe to tracking errors
EmitterSubscription
const subscription = HyperTrack.subscribeToErrors(errors => {
errors.forEach(error => {
// ... error
})
})
// later, to stop listening
subscription.remove()
Static subscribeSubscribe to availability changes
EmitterSubscription
const subscription = HyperTrack.subscribeToIsAvailable(isAvailable => {
if (isAvailable) {
// ... ready to go
}
})
// later, to stop listening
subscription.remove()
Static subscribeSubscribe to tracking intent changes
EmitterSubscription
const subscription = HyperTrack.subscribeToIsTracking(isTracking => {
if (isTracking) {
// ... ready to go
}
})
// later, to stop listening
subscription.remove()
Static subscribeSubscribe to location changes
EmitterSubscription
const subscription = HyperTrack.subscribeToLocation(location => {
...
})
// later, to stop listening
subscription.remove()
Static subscribeSubscribe to changes in the orders assigned to the worker
EmitterSubscription
const subscription = HyperTrack.subscribeToOrders(orders => {
...
})
// later, to stop listening
subscription.remove()
Adds a new geotag. Check Shift tracking and Clock In/Out tagging docs to learn how to use Order handle and Order status params.