Open
Conversation
Bambamdebian
approved these changes
Dec 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
requestConnectionPriority(int priority)
参数:
该接口是5.0以上的API,连接成功后,大数据传输前,调用此接口
Constants.PRIORITY_HIGH可以有更快的传输速度。真机实测:
(自己加了延迟10ms发送一包。在小米手机上实测,设置
Constants.PRIORITY_HIGH该值后,不加延迟一顿猛发容易丢包,所以最好加上10毫秒的延迟)魅族16sPro测试,调用或者不调用,速度都很快,20k图片BLE设备端接收完成都是20秒左右。
小米8SE测试,发送20k的图片,BLE设备端完全接收从1分多钟降到了20秒左右。
所以此接口还是有效的,具体效果看手机厂商底层的连接间隔。