Android - 使用蓝牙会减慢操作系统完成抓取的速度
我一直在尝试蓝牙并构建了一个与此处找到的功能几乎相同的测试应用程序: http://developer.android.com/guide/topics/wireless/bluetooth.html#ManagingAConnection
我发现当我运行该应用程序时,我可以与另一个 BT 设备通话并与其通信很好。然而,关闭应用程序后,我的系统速度会变慢,几乎无法使用。
此时,我开始查看哪些资源没有清理。我超载了活动的 OnStop/onPause,并在那里关闭了打开的套接字。这没有效果......
所以我想知道,是否还有其他我没有正确关闭或清理的东西会导致我的 AndroidOS 速度变慢?
I've been playing around with Bluetooth and built a test app that's almost identical to the functionality found here: http://developer.android.com/guide/topics/wireless/bluetooth.html#ManagingAConnection
I found that when I ran the app, I could talk to another BT device and communicate with it just fine. However, after closing the app my system would slow down to become almost unusable.
At this point, I started looking around at what resources weren't cleaned up. I overloaded the OnStop/onPause of my activity and in there I close my open socket. This had no effect...
So I'm wondering, is there something else I'm not properly closing or cleaning up that would be causing my AndroidOS to slowdown?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是三星设备,则 Android 2.1 及更低版本存在一个已知的蓝牙固件错误。
我在 Galaxy Tab 和 Galaxy ace 上遇到过这个错误。
可用的解决方法是在使用完蓝牙适配器后禁用并启用它。
If you're using a Samsung device, there is a known bluetooth firmware bug for android 2.1 and lower.
I have encountered this bug on the galaxy tab and galaxy ace.
The workaround available is to disable and enable the bluetooth adapter when you have finished using it.