We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BluetoothGattCallback#onConnectionStateChange() の仕様を見ると
public void onConnectionStateChange (BluetoothGatt gatt, int status, int newState) Added in API level 18 Callback indicating when GATT client has connected/disconnected to/from a remote GATT server. Parameters gatt GATT client status Status of the connect or disconnect operation. GATT_SUCCESS if the operation succeeds. newState Returns the new connection state. Can be one of STATE_DISCONNECTED or STATE_CONNECTED https://developer.android.com/intl/ja/reference/android/bluetooth/BluetoothGattCallback.html#onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)
public void onConnectionStateChange (BluetoothGatt gatt, int status, int newState)
Added in API level 18 Callback indicating when GATT client has connected/disconnected to/from a remote GATT server.
Parameters gatt GATT client status Status of the connect or disconnect operation. GATT_SUCCESS if the operation succeeds. newState Returns the new connection state. Can be one of STATE_DISCONNECTED or STATE_CONNECTED https://developer.android.com/intl/ja/reference/android/bluetooth/BluetoothGattCallback.html#onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)
なので Bletia の実装を status != GATT_SUCCES && newState == STATE_DISCONNECTED の場合も onDisconnect() とするべきではないでしょうか?
status != GATT_SUCCES && newState == STATE_DISCONNECTED
onDisconnect()
BluetoothGattCallbackHandler.class
public void onConnectionStateChange(BluetoothGattWrapper gatt, int status, int newState) { if(status == 0) { if(newState == 2) { this.mCallback.onConnect(gatt); } if(newState == 0) { this.mCallback.onDisconnect(gatt); } } else { this.mCallback.onError(new BletiaException(BleErrorType.valueOf(status))); } }
The text was updated successfully, but these errors were encountered:
ありがとうございます Bletia側で対応しておきます
Sorry, something went wrong.
izumin5210
No branches or pull requests
BluetoothGattCallback#onConnectionStateChange() の仕様を見ると
なので Bletia の実装を
status != GATT_SUCCES && newState == STATE_DISCONNECTED
の場合もonDisconnect()
とするべきではないでしょうか?BluetoothGattCallbackHandler.class
The text was updated successfully, but these errors were encountered: