Asset Tracking Callback

This section will help users understand and utilize asset-tracking callbacks effectively. By following these steps and implementing the AssetTrackingCallback interface, you can receive valuable updates about location changes, handle errors gracefully, and keep track of when the tracking process starts and stops for a specific asset. Additionally, you have the flexibility to remove the callback when it's no longer required.

Add the Callback

To add a callback, follow these simple steps:

  • Implement the AssetTrackingCallback interface in your code.

    class YourClass : AssetTrackingCallback {
        // Implement callback methods here
  • Add the callback to the AssetTracking instance.


Remove the Callback

When you no longer need the callback, you can easily remove it:


Here's an overview of the available callback methods:

  • onLocationSuccess(location: Location): This method is invoked when new location information becomes available.

  • onLocationFailure(exception: Exception): If an error occurs during the tracking process, this method is called to handle the error.

  • onTrackingStart(assetId: String): It is invoked when the tracking process starts for a specified asset, providing you with relevant information.

  • onTrackingStop(assetId: String): When the tracking process stops for a particular asset, this method is triggered.

  • onTrackingStop(assetId: String, trackingDisableType: TrackingDisableType): In situations where tracking is stopped for an asset with specific disabled type information, this method provides those details.

By following these steps and understanding the available callback methods, you can effectively incorporate asset-tracking capabilities into your application without needing to be a developer.

Have Questions ?