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

程序建议 #4

Closed
wzhsh90 opened this issue Sep 7, 2016 · 6 comments
Closed

程序建议 #4

wzhsh90 opened this issue Sep 7, 2016 · 6 comments

Comments

@wzhsh90
Copy link

wzhsh90 commented Sep 7, 2016

1、ListScanCallback 这个回调是在超时后才返回,如果设置超时10s或更大则回调太晚给用户体验不好
建议直接返回blueDevice
2、onLeScan device.getName()这个蓝牙名称不一定真实,需要对scanRecord进行分析得到localname才是真实的
3、增加对ble是否支持判断
4、增加对蓝牙状态监听处理
5、增加writeWithoutResponse
6、建议不用handler 进行主线程切换,建议使用org.greenrobot:eventbus:3.0.0

以上只是个人开发建议,有不当地方,还望详解。

@dongweiq
Copy link

dongweiq commented Sep 8, 2016

作者已经改了第3、4个建议,而且对我提出的多个callback回调也写入了说明,反馈的好快👍

@wzhsh90
Copy link
Author

wzhsh90 commented Sep 8, 2016

蓝牙状态处理如果是在android5 以下是没有问题,但是android 6 就有问题了。

@tianshaokai
Copy link

线程切换可以用RxJava 和 RxAndroid

@jyz0025338
Copy link

2、onLeScan device.getName()这个蓝牙名称不一定真实,需要对scanRecord进行分析得到localname才是真实的

这个真的是有必要的。。。

@mendax92
Copy link

mendax92 commented Nov 11, 2016

getName()经常没有值...,需要作者优化一下

@ghost
Copy link

ghost commented Mar 23, 2017

@mendax92 难道真是楼上说的需要从scanRecord中分析吗?

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

6 participants