Class AssetTrackingOptions.Builder

  • Enclosing class:
    AssetTrackingOptions

    public static class AssetTrackingOptions.Builder
    extends java.lang.Object
    • Method Detail

      • setEnabled

        public AssetTrackingOptions.Builder setEnabled​(boolean enabled)
        Enables or disables asset tracking for BLE beacons. When enabled, the SDK continuously scans the environment for BLE beacons, recording readings in a structured manner. These readings are aggregated and uploaded to the Dashboard, where they are associated with the user's current position. This association enables the extrapolation of the absolute position of the scanned beacons, providing precise tracking capabilities.
        Parameters:
        enabled - Set to true to enable asset tracking, or false to disable it. The default value is false.
        Returns:
        The current instance of the Builder to allow method chaining.
      • scanningInterval

        public AssetTrackingOptions.Builder scanningInterval​(long scanningInterval)
        Specifies the time interval in seconds during which BLE beacon readings are collected and aggregated into a single batch. For each scanning interval, the SDK ensures that each unique beacon is recorded only once, and the associated timestamp corresponds to the end of the interval. This efficient approach reduces resource usage by consolidating duplicate readings.

        The aggregated data is prepared for uploading to the Dashboard. To upload multiple intervals in a single operation, use scanIterationsToUpload(int).

        To restrict the scanning to specific UUIDs, use beaconFilters(List).
        Parameters:
        scanningInterval - The duration of each scanning interval, in seconds. The default value is 300s.
        Returns:
        The current instance of the Builder to allow method chaining.
      • scanIterationsToUpload

        public AssetTrackingOptions.Builder scanIterationsToUpload​(int scanIterationsToUpload)
        Configures how many scanning intervals are uploaded in a single operation. For instance, setting this value to 2 means that uploads will occur after every 2 scanning intervals.

        A value of 1 (default) ensures immediate uploads after each interval, making data available as soon as possible.

        This parameter allows precise control over the data accumulation and upload strategy. Higher values can reduce data usage but will delay the availability of uploaded information.

        Parameters:
        scanIterationsToUpload - The number of scanning intervals to upload in a single operation. Must be a positive integer. The default value is 1.
        Returns:
        The current instance of the Builder to allow method chaining.
      • beaconFilters

        public AssetTrackingOptions.Builder beaconFilters​(@Nullable
                                                          java.util.List<BeaconFilter> beaconFilters)
        Defines a whitelist of device UUIDs for BLE beacon scanning. Only beacons with UUIDs included in this list will be tracked. All other devices will be ignored during scanning. This feature is useful for filtering out irrelevant beacons and focusing on a specific set of devices.

        If an invalid UUID is passed, you will receive an status of LocationStatus.BAD_ASSET_TRACKING_OPTIONS at LocationListener.onStatusChanged(LocationStatus).

        Parameters:
        beaconFilters - A list of accepted UUIDs. Beacons with UUIDs not in this list will be discarded. The list can be empty or null to disable filtering. By default no filters are applied.
        Returns:
        The current instance of the Builder to allow method chaining.