Releases: hypertrack/sdk-ionic-capacitor
Releases · hypertrack/sdk-ionic-capacitor
3.7.1
3.7.0
3.6.3
3.6.2
3.6.1
Changed
- Updated HyperTrack SDK Android to 7.8.2
3.6.0
Added
- Support for Motion & Activity detection
- If your app asks for the Motion & Activity permission (for iOS) or the Activity Recognition permission (for Android) and the user grants it, you will have better activity detection in polylines
Changed
3.5.1
Fixed
- Serialization bug for
Order.isInsideGeofence
success case on iOS
3.5.0
Added
- Support for on-device geofencing via new
HyperTrack.orders.get("my_order_handle").isInsideGeofence
property- To learn more about how to best use this new feature see our guide here: Verify shift presence before starting work
Example use for worker clock in:
// check worker presence synchronously
let activeOrders = await HyperTrack.getOrders()
let currentOrder = activeOrders.get("current_order")
if (currentOrder !== undefined) { handlePresence(currentOrder) }
else { console.log("'current_order' not found") }
// or subscribe to the changes in orders to get the status updates
HyperTrack.subscribeToOrders(orders => {
let let currentOrder = activeOrders.get("current_order")
if (currentOrder !== undefined) { handlePresence(currentOrder) }
else { console.log("'current_order' not found") }
})
// handle worker presence inside the order destination geofence
function handlePresence(isInsideGeofence: Result<boolean, LocationError>) {
switch (isInsideGeofence.type) {
case 'success':
if (isInsideGeofence.value) {
// allow worker to clock in for the shift
} else {
// "to clock in you must be at order destination"
}
break;
case 'failure':
// resolve errors to check for presence
break;
}
}
Changed
3.4.0
Added
- New
setWorkerHandle
andgetWorkerHandle
can be used to identify workers- We observed our customers identify worker devices via
HyperTrack.metadata
, so we decided to make it a first class citizen in our API. - If you previously used
metadata
to identify workers, we suggest usingworkerHandle
for this purpose instead.
- We observed our customers identify worker devices via