flutter_blue icon indicating copy to clipboard operation
flutter_blue copied to clipboard

connected ' discoverServices ' is't get

Open LiangLuDev opened this issue 6 years ago • 6 comments
trafficstars

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

LiangLuDev avatar Nov 04 '19 06:11 LiangLuDev

me too.

miseyu avatar Nov 26 '19 07:11 miseyu

@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 avatar Apr 09 '20 02:04 ride4sun

@ride4sun current connected. iOS : Although the settings show that it is connected, it still needs to be connected in the app

LiangLuDev avatar Apr 09 '20 03:04 LiangLuDev

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 .

ride4sun avatar Apr 09 '20 18:04 ride4sun

same issuses.

woopluz avatar Oct 20 '20 06:10 woopluz

Facing same issue

EricTURATSINZE avatar Jan 06 '24 16:01 EricTURATSINZE