Comments (6)
很多的时候,你需要维持多个callback不停监听。当不需要该callback的时候,可以将该callback移除。移除方法,详见Usgae。
from fastble.
我看代码里有断开服务的时候removeCallback的操作,但是有的时候断开直接就异常了,没有调用到removeCallback方法,所以才会导致多个callback重复回调
from fastble.
对啊,每连接一次就多一个
from fastble.
之前连接过,并且连接状态是BleManager.getInstance().isConnected() = true,但是再次扫描之后未连接任何设备,连接状态变成了BleManager.getInstance().isConnected() = false。其实之前的连接状态还是true,这是什么原因呢?
from fastble.
的確斷開後重新連結會有多個callback,代表clearCallback()沒有效
試過stopListenCharacterCallback()也無效
from fastble.
新版已修复
from fastble.
Related Issues (20)
- app运行过程中闪退,异常是框架里的代码 Attempt to invoke virtual method 'boolean com.hihonor.bluetooth.btfreeze.BluetoothBleConnectItem.isSame(com.hihonor.bluetooth.btfreeze.BluetoothBleConnectItem)' on a null object reference com.clj.fastble.bluetooth.BleBluetooth.connect(BleBluetooth.java:10)
- onCharacteristicChanged内存泄漏
- 发送失败: GattException{gattStatus=10} BleException { code=101, description='Gatt Exception Occurred! '}
- 添加服务UUid扫描不到设备 HOT 1
- 我写了一个库,欢迎来围观 HOT 3
- 我已解决notify的那个102 descriptor equals null 的错 HOT 9
- 使用FastBle发送图片的同时使用A2dp协议播放音乐 但是暂停后不能恢复的问题
- FastBle怎么调用无返回的特征值写入,没有看到相关的api呢
- 一个设备可以被多次连接,多次连接成功之后, 断开一次就断不开了。 HOT 2
- 现在的版本是否支持外设模式
- vivoV2241A搜索不到
- onWriteFailure 102 This device not connect! HOT 3
- Is there a trick to set the MTU size? HOT 1
- ActivityCompat.checkSelfPermission PackageManager.PERMISSION_GRANTED) {
- 蓝牙设备连接成功后,到开始发现服务,中间sleep了 500ms,这里为什么要休眠呢? HOT 2
- 请问一下,怎么设置write no response模式? HOT 1
- 设置MTU值成功之后,如果分包传输设为false,手机app向蓝牙模块发送数据,超过20字节,蓝牙会自动断开 HOT 1
- 手机连手机收发数据可以吗
- 当长按蓝牙设备按钮时,抬起的时候收不到消息了
- Jetpack 出了新的 bluetooth api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastble.