How to establish connection and then read characteristics in one activity?
问题 Currently modifying the sample code and I am encountering an error when try to establish a connection and then read a characteristic in one activity. I am getting BleAlreadyConnectedException when attempting to read from the device. I am first connecting on onCreate. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_device); // How to listen for connection state changes bleDevice.observeConnectionStateChanges()