update: question irrelevant. careful debugging showed reaching connection state change. need learn more of tools built android-studio. reading gatt documentation on android website shows status = 0 indicates successful connection, not null state believed.
for others concerned gatt status documentation found here: https://developer.android.com/reference/android/bluetooth/bluetoothgatt.html
original: trying connect bluetooth le device using android studio , able find , attempt connect it. device stops blinking, indicating still connected, cannot code ever reach bluetoothgattcallback. log reads
d/bluetoothgatt: onsearchcomplete() = device=f4:b8:5e:a6:ce:d0 status=0 06-06 16:35:09.682 17511-19374/com.somesite.dl503.vacuumgauge d/bluetoothgatt: onclientconnparamschanged() - device=f4:b8:5e:a6:ce:d0 interval=39 status=0 06-06 16:35:13.112 17511-17522/com.somesite.dl503.vacuumgauge d/bluetoothgatt: onclientconnparamschanged() - device=f4:b8:5e:a6:ce:d0 interval=15 status=0
has else ever encountered status = 0 or never entering gatt callback?
connected code:
mconnectedgatt = device.connectgatt(this, false, mgattcallback, bluetoothdevice.transport_auto);
my gatt callback onconncectionstatechange should called first, right?
@override public void onconnectionstatechange(bluetoothgatt gatt, int status, int newstate) { if (status == bluetoothgatt.gatt_success && newstate == bluetoothprofile.state_connected) { gatt.discoverservices(); } else if (status == bluetoothgatt.gatt_success && newstate == bluetoothprofile.state_disconnected) { } else if (status != bluetoothgatt.gatt_success) { gatt.disconnect(); } }