[英]Is there a way to fix a BLE advertising interval in Android?
I'm making an Android application and I'd need to send advertising data at a fixed advertising interval.我正在制作一个 Android 应用程序,我需要以固定的广告间隔发送广告数据。
I've tried setting an advertising interval value using the setInterval()
function from AdvertisingSetParameters
class, but when I check the advertising interval in a scanner device using nRF Connect or BLE Scanner applications, it shows a lot of variance between advertising intervals.我尝试使用
AdvertisingSetParameters
class 中的setInterval()
function 设置广告间隔值,但是当我使用nRF Connect或BLE Scanner应用程序检查扫描仪设备中的广告间隔时,它显示广告间隔之间存在很大差异。
To sum up, I'd like to know if it's possible to fix an advertising interval in an Android application .总而言之,我想知道是否可以在 Android 应用程序中修复广告间隔。
Thank you in advance for your time!提前感谢您的宝贵时间!
According to documentation , you can set the advertising interval using the setInterval()
function of the AdvertisingSetParameters
class, as you said.根据文档,您可以使用
AdvertisingSetParameters
class 的setInterval()
function 设置广告间隔,如您所说。 The advertising interval set is fixed.广告间隔设置是固定的。
The phenomena you are experiencing could be due of two possible causes:您遇到的现象可能是由于两个可能的原因:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.