wandersnail / easyble-x

A simple framework for Android Bluetooth Low Energy (BLE)
Apache License 2.0
156 stars 37 forks source link

自动连接怎么设置 #2

Closed zoozooll closed 5 years ago

zoozooll commented 5 years ago

自动连接怎么设置,自动连接的场景有两种

  1. 当打开软件时候查找机器并自动连接
  2. 当某种原因例如走远之后
wandersnail commented 5 years ago

建立连接后,断线会自动重连。 @Nullable public Connection connect(@NonNull Device device, @NonNull ConnectionConfiguration configuration) { return connect(device, configuration, null); }