本文整理汇总了Java中org.altbeacon.beacon.Beacon.getServiceUuid方法的典型用法代码示例。如果您正苦于以下问题:Java Beacon.getServiceUuid方法的具体用法?Java Beacon.getServiceUuid怎么用?Java Beacon.getServiceUuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.altbeacon.beacon.Beacon
的用法示例。
在下文中一共展示了Beacon.getServiceUuid方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addBeacon
import org.altbeacon.beacon.Beacon; //导入方法依赖的package包/类
public void addBeacon(Beacon beacon) {
if (beacon.getServiceUuid() == 0xfeaa) {
if (beacon.getBeaconTypeCode() == 0x00) {
eddystoneUID = beacon;
} else if (beacon.getBeaconTypeCode() == 0x10) {
eddystoneURL = beacon;
} else if (beacon.getBeaconTypeCode() == 0x20) {
eddystoneTLM = beacon;
}
} else {
iBeacon = beacon;
}
lastAddedBeacon = beacon;
}
示例2: track
import org.altbeacon.beacon.Beacon; //导入方法依赖的package包/类
/**
* Tracks a beacon. For Gatt-based beacons, returns a merged copy of fields from multiple
* frames. Returns null when passed a Gatt-based beacon that has is only extra beacon data.
*/
@Nullable
public synchronized Beacon track(@NonNull Beacon beacon) {
Beacon trackedBeacon = null;
if (beacon.isMultiFrameBeacon() || beacon.getServiceUuid() != -1) {
trackedBeacon = trackGattBeacon(beacon);
}
else {
trackedBeacon = beacon;
}
return trackedBeacon;
}
示例3: getBeaconKey
import org.altbeacon.beacon.Beacon; //导入方法依赖的package包/类
private String getBeaconKey(@NonNull Beacon beacon) {
if (matchBeaconsByServiceUUID) {
return beacon.getBluetoothAddress() + beacon.getServiceUuid();
} else {
return beacon.getBluetoothAddress();
}
}
示例4: isEddystoneUID
import org.altbeacon.beacon.Beacon; //导入方法依赖的package包/类
public static boolean isEddystoneUID(Beacon beacon) {
return (beacon.getServiceUuid() == 0xfeaa) && (beacon.getBeaconTypeCode() == 0);
}
示例5: isEddystoneURL
import org.altbeacon.beacon.Beacon; //导入方法依赖的package包/类
public static boolean isEddystoneURL(Beacon beacon) {
return (beacon.getServiceUuid() == 0xfeaa && beacon.getBeaconTypeCode() == 16);
}
示例6: isAltBeacon
import org.altbeacon.beacon.Beacon; //导入方法依赖的package包/类
public static boolean isAltBeacon(Beacon beacon) {
return beacon.getServiceUuid() == 0xbeac;
}