Ger*_*ero 2 android bluetooth-lowenergy android-bluetooth ibeacon ibeacon-android
我在 android 中使用一些 Sticknfind 信标(sticknfind android SDK)。如何从源代码中的信标获取主要值和次要值?我已经使用了应用程序:StickNFind Beacon Maker,并且我已经指定了值。
Major: 0001 Minor: 0002
为了获取uuid:dev.getBtDevice().getAddress()
有没有dev.getBtDevice().getMinor() 或getMajor()?
public String getMajor() {
major = String.valueOf( (mScanRecord[25] & 0xff) * 0x100 + (mScanRecord[26] & 0xff));
return major;
}
public String getMinor() {
minor = String.valueOf( (mScanRecord[27] & 0xff) * 0x100 + (mScanRecord[28] & 0xff));
return minor;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5000 次 |
| 最近记录: |