Namespace hcap.beacon
hcap.beacon
- Defined in: hcap-1.24.6.5901.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
Method Summary
Namespace Detail
hcap.beacon
Method Detail
-
<static> hcap.beacon.getBeaconInformation(param)Gets the configuration of beacon.
hcap.beacon.getBeaconInformation({ "onSuccess" : function(s) { console.log("onSuccess : " + "\n beacon mode : " + s.beaconMode + "\n beacon type : " + s.beaconType + "\n iBeacon uuid : " + s.iBeaconUuid + "\n iBeacon major : " + s.iBeaconMajor + "\n iBeacon minor : " + s.iBeaconMinor + "\n eddystone uuid : " + s.eddyStoneUuid + "\n eddystone frame : " + s.eddyStoneFrame + "\n eddystone url prefix : " + s.eddyStoneUrlPrefix + "\n eddystone url ex code : " + s.eddyStoneUrlExCode + "\n eddystone url : " + s.eddyStoneUrl); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function (param) { // {Boolean} param.beaconMode - true : enable to beacon mode, false : disable // {String} param.beaconType - beacon type(iBeacon, eddystone) // {String} param.iBeaconUuid - uuid of iBeacon. // {Number} param.iBeaconMajor - major of iBeacon. // {Number} param.iBeaconMinor - minor of iBeacon. // {String} param.eddyStoneUuid - uuid of eddystone. // {String} param.eddyStoneFrame - frame of eddystone. // {String} param.eddyStoneUrlPrefix - url prefix of eddystone. // {String} param.eddyStoneUrlExCode - url ex code of eddystone. // {String} param.eddyStoneUrl - url of eddystone. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
- {Function} param.onSuccess [Optional] - success callback function.
-
<static> hcap.beacon.requestEddystoneUid(param)Request the Eddystone Uid.
This is worked only when the beacon mode is enabled.
hcap.beacon.requestEddystoneUid({ "uuid" : "AAAAAAAAAAAAAAAAAAAABBBBBBBB", "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {String} param.uuid [Required] - uuid. the range is 0~F(field1: 20 digits string, field2: 8 digits string)
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() { // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
-
<static> hcap.beacon.requestEddystoneUrl(param)Request the Eddystone Url.
This is worked only when the beacon mode is enabled.
hcap.beacon.requestEddystoneUrl({ "prefix" : "httpEx", "excode" : "eduEx", "url" : "abcdefghijklmnopq", "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {String} param.prefix [Required] - url prefix ("http", "httpEx", "https", "httpsEx")
- {String} param.excode [Required] - url excode ("noneValue", "comEx", "orgEx", eduEx", "netEx", "infoEx", "bizEx", "govEx", "com", "org", "edu", "nex", "info", "biz", "gov")
- {String} param.url [Required] - url. max length is 17. but max length is 15 when prefix is "httpsEx" or excode is "infoEx".
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() { // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
-
<static> hcap.beacon.requestiBeacon(param)Request the iBeacon.
This is worked only when the beacon mode is enabled.
hcap.beacon.requestiBeacon({ "uuid" : "AAAAAAAABBBBCCCCDDDDEEEEEEEE", "major" : 65535, "minor" : 65535, "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {String} param.uuid [Required] - uuid. the range is 0~F(field1: 8 digits string, field2: 4 digits string, field3: 4 digits string, field4: 4 digits string, field5: 8 digits string)
- {Number} param.major [Required] - the value of major (0 ~ 65535)
- {Number} param.minor [Required] - the value of minor (0 ~ 65535)
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() { // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
-
<static> hcap.beacon.setBeaconMode(param)Sets the beacon mode is enabled or disabled.
hcap.beacon.setBeaconMode({ "enable" : true, "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Boolean} param.enable [Required] - true : enable to beacon mode, false : disable.
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() { // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
-
<static> hcap.beacon.startScan(param)Starts to scan beacon data.
hcap.beacon.startScan({ "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() { // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
- {Function} param.onSuccess [Optional] - success callback function.
- Since:
- 1.24.6
-
<static> hcap.beacon.stopScan(param)Stops beacon data scanning.
hcap.beacon.stopScan({ "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() { // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
- {Function} param.onSuccess [Optional] - success callback function.
- Since:
- 1.24.6