Hyper Track
Main interface to use HyperTrack Android SDK in your app. SDK allows you to track current device in real-time in almost no effort while having ready to use dashboard and backend infrastructure already build for a bunch of existing use-cases.
Usage:
HyperTrack sdk = HyperTrack.getInstance(myPublishableKey)
.setDeviceName("Elvis")
.allowMockLocations()
.addTrackingListener(this);
Log.d(TAG, "HyperTrack device id is " + sdk.getDeviceID());
sdk.start();
Content copied to clipboard
See our awesome quickstart for details.
Functions
Link copied to clipboard
open fun addAvailabilityListener(@Nullable listener: AvailabilityStateObserver.OnAvailabilityStateChangeListener): HyperTrack
Content copied to clipboard
Sets listener that will be notified when availability changes.
Link copied to clipboard
Convenience alias to addGeotag with null expected location.
open fun addGeotag(@NonNull payload: Map<String, out Any>, @Nullable expected: Location): GeotagResult
Content copied to clipboard
Creates geotag with configurable payload.
Link copied to clipboard
open fun addTrackingListener(@Nullable listener: TrackingStateObserver.OnTrackingStateChangeListener): HyperTrack
Content copied to clipboard
Sets listener that will be notified when tracking starts/stops or significant error occurred.
Link copied to clipboard
Allows you to use location mocking software (e.g.
Link copied to clipboard
Sets whether to request background location permission on Android 11 and later.
Link copied to clipboard
Enables debug log output.
Link copied to clipboard
Gets current Availability status
Link copied to clipboard
Link copied to clipboard
Content copied to clipboard
Asynchronous access to the current device location.
Link copied to clipboard
Link copied to clipboard
Entry point to SDK usage.
Link copied to clipboard
Latest device location, that is known to HyperTrack SDK.
Link copied to clipboard
Link copied to clipboard
open fun removeAvailabilityListener(@Nullable listener: AvailabilityStateObserver.OnAvailabilityStateChangeListener): HyperTrack
Content copied to clipboard
Link copied to clipboard
open fun removeTrackingListener(@Nullable listener: TrackingStateObserver.OnTrackingStateChangeListener): HyperTrack
Content copied to clipboard
Removes listener or does nothing, if null was passed in as argument.
Link copied to clipboard
Convenience method that will issue required permissions request dialog if necessary.
Link copied to clipboard
Sets current Availability status
Link copied to clipboard
open fun setDeviceMetadata(@Nullable metaData: Map<String, Any>): HyperTrack
Content copied to clipboard
Sets current device data, that can be used for easier dashboard navigation or grouping of location data in tag groups style.
Link copied to clipboard
Sets current device name, that can be used for easier dashboard navigation.
Link copied to clipboard
open fun setTrackingNotificationConfig(@Nullable config: ServiceNotificationConfig): HyperTrack
Content copied to clipboard
Allows to to customize persistent notification elements.
Link copied to clipboard
Starts tracking, if all requirements are met (permissions are granted and publisahble Key is validated).
Link copied to clipboard
Stops current tracking session.
Link copied to clipboard
This method checks with HyperTrack cloud whether to start or stop tracking.