Class: Toybox.AntPlus.DeviceState

Overview

The DeviceState object represents the state of the device.

Fields may return null so you should null check values before using them.

Example:

using Toybox.AntPlus;

// Assumes AntPlus.Device.getDeviceState(); already called
var state = deviceState.state;
var deviceNumber = deviceState.deviceNumber;

System.println("Current device state is: " + state);
System.println("Current device number is: " + deviceNumber);

Since:

API Level 2.2.0

Instance Member Summary collapse

Instance Attribute Details

var deviceNumber as Lang.Number or Null

The current Device ID being tracked/searched for.

Since:

API Level 2.2.0

Returns:

var state as AntPlus.DeviceCurrentState or Null

The state of the device as an DEVICE_STATE_* value.

Since:

API Level 2.2.0

Returns:


Generated Sep 23, 2024, 3:32:48 PM