flutter_blue
flutter_blue copied to clipboard
connected ' discoverServices ' is't get
Hi @pauldemarco
List<BluetoothDevice> devices = await FlutterBlue.instance.connectedDevices;
List<BluetoothService> services= await devices[0].discoverServices();
print('$services');
Android error : java.lang.IllegalArgumentException: Unsupported value: java.lang.Exception: no instance of BluetoothGatt, have you connected first?
iOS error: not print log and services
TKS
me too.
@LiangLuDev yes the device has to be connected before you can call dicoverServices. The new version will throw an exception when you don't. Can this be closed?
@ride4sun current connected. iOS : Although the settings show that it is connected, it still needs to be connected in the app
Can describe that behavior a bit better? - Possibly with some code.
On Wed, Apr 8, 2020 at 8:27 PM LuLiang [email protected] wrote:
@ride4sun https://github.com/ride4sun current connected. iOS : Although the settings show that it is connected, it still needs to be connected in the app
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pauldemarco/flutter_blue/issues/426#issuecomment-611307471, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3BZ2Z672R4KT5ZF6ITME3RLU6BZANCNFSM4JIPVYNA .
same issuses.
Facing same issue