You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In GattClient, while connecting to gatt , if characterstic is null, it generates Unhandled Exception
To Reproduce
just try to connect any BLE device
Expected behavior
Handle this exception
Logs
Screenshots
2019-03-09 12:36:48.080 22582-22603/com.nilhcem.blenamebadge W/BluetoothGatt: Unhandled exception in callback
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.bluetooth.BluetoothGattCharacteristic.getProperties()' on a null object reference
at android.bluetooth.BluetoothGatt.writeCharacteristic(BluetoothGatt.java:1155)
at com.nilhcem.blenamebadge.device.bluetooth.GattClient.writeNextData(GattClient.kt:72)
at com.nilhcem.blenamebadge.device.bluetooth.GattClient.writeDataStart(GattClient.kt:60)
at com.nilhcem.blenamebadge.ui.message.MessagePresenter$sendBytes$2$3.invoke(MessagePresenter.kt:49)
at com.nilhcem.blenamebadge.ui.message.MessagePresenter$sendBytes$2$3.invoke(MessagePresenter.kt:14)
at com.nilhcem.blenamebadge.device.bluetooth.GattClient$gattCallback$1.onServicesDiscovered(GattClient.kt:42)
at android.bluetooth.BluetoothGatt$1$5.run(BluetoothGatt.java:328)
at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:770)
at android.bluetooth.BluetoothGatt.access$200(BluetoothGatt.java:39)
at android.bluetooth.BluetoothGatt$1.onSearchComplete(BluetoothGatt.java:323)
at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:111)
at android.os.Binder.execTransact(Binder.java:731)
2019-03-09 12:36:48.138 22582-22603/com.nilhcem.blenamebadge D/BluetoothGatt: onConnectionUpdated() - Device=D3:C3:10:49:09:D8 interval=36 latency=0 timeout=500 status=0
Smartphone Info:
Device : Nokia 6.1
Android Version : 9.0 android pie
Would you like to work on the issue?
Yes
The text was updated successfully, but these errors were encountered:
Describe the bug
In GattClient, while connecting to gatt , if characterstic is null, it generates Unhandled Exception
To Reproduce
just try to connect any BLE device
Expected behavior
Handle this exception
Logs
Screenshots
Smartphone Info:
Device : Nokia 6.1
Android Version : 9.0 android pie
Would you like to work on the issue?
Yes
The text was updated successfully, but these errors were encountered: