HyperTrack

public class HyperTrack

The main entry point for the HyperTrack SDK

Types

Link copied to clipboard
public final class Cancellable
Link copied to clipboard
public class Error
Link copied to clipboard
public final class Location
Link copied to clipboard
public class LocationError

The reason for why the SDK doesn't have a fresh location.

Link copied to clipboard
public final class LocationWithDeviation

Geotag location with deviation from expected location in meters.

Link copied to clipboard
public class OrderStatus

Order event

Functions

Link copied to clipboard
final static Result<HyperTrack.Location, HyperTrack.LocationError> addGeotag(    String orderHandle,     HyperTrack.OrderStatus orderStatus,     Json.Object metadata)

Adds a new geotag with order status. Order status is used to identify the important moments during the fulfillment using custom labels (e.g clockIn, clockOut, login, accepted, started, arrived, completed, logout etc.). This provides the ability to filter and aggregate KPIs across geotags available through APIs and the Ops Views. Use geotags to mark a location at the current timestamp with custom metadata associated with this location.

final static Result<HyperTrack.LocationWithDeviation, HyperTrack.LocationError> addGeotag(    String orderHandle,     HyperTrack.OrderStatus orderStatus,     Json.Object metadata,     HyperTrack.Location expectedLocation)

Adds a new geotag with expected location and order status. Use geotags to mark a location at the current timestamp with custom metadata associated with this location. Order status is used to identify the important moments during the fulfillment using custom labels (e.g clockIn, clockOut, login, accepted, started, arrived, completed, logout etc.). This provides the ability to filter and aggregate KPIs across geotags available through APIs and the Ops Views. Expected location is used to calculate deviation distance of the actual location where the geotag was recorded from the expected place.

Link copied to clipboard
final static String getDynamicPublishableKey()
Link copied to clipboard
final static HyperTrack.Cancellable locate(Function1<Result<HyperTrack.Location, Set<HyperTrack.Error>>, Unit> callback)

Requests one-time location update and returns the location once it is available, or error.

Link copied to clipboard
final static Unit setDynamicPublishableKey(static String dynamicPublishableKey)
Link copied to clipboard
final static HyperTrack.Cancellable subscribeToErrors(Function1<Set<HyperTrack.Error>, Unit> callback)

Subscribe to tracking errors

Link copied to clipboard
final static HyperTrack.Cancellable subscribeToIsAvailable(Function1<Boolean, Unit> callback)

Subscribe to availability changes

Link copied to clipboard
final static HyperTrack.Cancellable subscribeToIsTracking(Function1<Boolean, Unit> callback)

Subscribe to tracking intent changes

Link copied to clipboard
final static HyperTrack.Cancellable subscribeToLocation(Function1<Result<HyperTrack.Location, HyperTrack.LocationError>, Unit> callback)

Subscribe to location changes

Properties

Link copied to clipboard
private final static String deviceID

Returns a string that is used to uniquely identify the device

Link copied to clipboard
private static String dynamicPublishableKey
Link copied to clipboard
private final static Set<HyperTrack.Error> errors

Returns any errors that have occurred in the SDK

Link copied to clipboard
public final static HyperTrack INSTANCE
Link copied to clipboard
private final static Boolean isAvailable

Reflects availability of the device for the Nearby search

Link copied to clipboard
private final static Boolean isTracking

Reflects the tracking intent for the device

Link copied to clipboard
private final static Result<HyperTrack.Location, HyperTrack.LocationError> location

Reflects the current location of the user or an outage reason

Link copied to clipboard
private final static Json.Object metadata

Gets the metadata that is set for the device

Link copied to clipboard
private final static String name

Gets the name that is set for the device