Class DeviceInfo#getBeaconInfo
DeviceInfo
- Defined in: deviceInfo.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
DeviceInfo#getBeaconInfo(successCallback, errorCallback)
Gets beacon information.
|
Class Detail
DeviceInfo#getBeaconInfo(successCallback, errorCallback)
Gets beacon information.
// Javascript code
function getBeaconInfo () {
function successCb(cbObject) {
console.log("cbObject : " + JSON.stringify(cbObject));
console.log("enabled : " + cbObject.enabled);
console.log("uuid : " + cbObject.uuid);
console.log("major : " + cbObject.major);
console.log("minor : " + cbObject.minor);
}
function failureCb(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var deviceInfo = new DeviceInfo();
deviceInfo.getBeaconInfo(successCb, failureCb);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
| Property | Type | Description | Required |
|---|---|---|---|
| enabled | Boolean | Beacon is enabled true: enabled, false: disabled | required |
| uuid | String | UUID of beacon, 32 hexadecimal digits. Only valid when 'enabled' is true. | required |
| major | Number | Major number of beacon.(0 ~ 65535) Only valid when 'enabled' is true. | required |
| minor | Number | Minor number of beacon.(0 ~ 65535) Only valid when 'enabled' is true. | required |
- Since:
- 1.3
- Platform Version:
- webOS Signage 2.0
- Returns:
- See:
- DeviceInfo.setBeaconInfo()
,