connect static method

void connect(
  1. String address,
  2. void onConnected(
    1. String
    ),
  3. void onDisconnected(),
  4. void onConnectionError(),
)

Try to connect to a Movesense device with the given address. Address is Bluetooth MAC address for Android devices and UUID for iOS devices. When connection is established, onConnected is called with the device serial. onDisconnected is called when device disconnects. onConnectionError is called when an error occurs during connection attempt.

Note: If you need DeviceInfo upon connection, you should manually subscribe to "MDS/ConnectedDevices" to get detailed device information upon connection.

Implementation

static void connect(String address, void Function(String) onConnected,
    void Function() onDisconnected, void Function() onConnectionError) {
  MdsImpl().connect(address, onConnected, onDisconnected, onConnectionError);
}