Skip to content
New issue

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

建议:关闭连接时先移除callback #16

Closed
liaolintao opened this issue Nov 15, 2016 · 1 comment
Closed

建议:关闭连接时先移除callback #16

liaolintao opened this issue Nov 15, 2016 · 1 comment

Comments

@liaolintao
Copy link
Contributor

在关闭当前连接的时候, 先移除callback, 再断开连接;因为断开连接会触发连接失败的回调.

/**

  • 关闭连接
    */
    public void closeBluetoothGatt() {
    if (bleBluetooth != null) {
    bleBluetooth.clearCallback();
    bleBluetooth.closeBluetoothGatt();
    }
    }
@Jasonchenlijian
Copy link
Owner

建议很好!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants