function processUriBeacon(advertiserData) {
  var data = advertiserData.serviceData.data;
  var uriBeacon = {};
  var flags = parseInt(data.substr(0,2),16);
  uriBeacon.invisibleHint = false;
  if(flags & 0x01) {
    uriBeacon.invisibleHint = true;
  }
  var rawTxPower = data.substr(2,2);
  uriBeacon.txPower = pdu.convertTxPower(rawTxPower);
  var schemePrefix = data.substr(4,2);
  uriBeacon.url = parseSchemePrefix(schemePrefix);
  var encodedUrl = data.substr(6);
  uriBeacon.url += parseEncodedUrl(encodedUrl);

  advertiserData.serviceData.uriBeacon = uriBeacon;
}
/**
 * Parse BLE advertiser UriBeacon data. (from Google's Physical Web).
 * https://github.com/google/uribeacon/blob/master/specification/AdvertisingMode.md
 * @param {string} data The raw UriBeacon data as a hexadecimal-string.
 */
Parse BLE advertiser UriBeacon data. (from Google's Physical Web).
Parse BLE advertiser UriBeacon data . ( from Google ' s Physical Web ) .
function processUriBeacon(advertiserData) {
  var data = advertiserData.serviceData.data;
  var uriBeacon = {};
  var flags = parseInt(data.substr(0,2),16);
  uriBeacon.invisibleHint = false;
  if(flags & 0x01) {
    uriBeacon.invisibleHint = true;
  }
  var rawTxPower = data.substr(2,2);
  uriBeacon.txPower = pdu.convertTxPower(rawTxPower);
  var schemePrefix = data.substr(4,2);
  uriBeacon.url = parseSchemePrefix(schemePrefix);
  var encodedUrl = data.substr(6);
  uriBeacon.url += parseEncodedUrl(encodedUrl);
  advertiserData.serviceData.uriBeacon = uriBeacon;
}
function processUriBeacon ( advertiserData ) { var data = advertiserData . serviceData . data ; var uriBeacon = { } ; var flags = parseInt ( data . substr ( 0 , 2 ) , 16 ) ; uriBeacon . invisibleHint = false ; if ( flags & 0x01 ) { uriBeacon . invisibleHint = true ; } var rawTxPower = data . substr ( 2 , 2 ) ; uriBeacon . txPower = pdu . convertTxPower ( rawTxPower ) ; var schemePrefix = data . substr ( 4 , 2 ) ; uriBeacon . url = parseSchemePrefix ( schemePrefix ) ; var encodedUrl = data . substr ( 6 ) ; uriBeacon . url += parseEncodedUrl ( encodedUrl ) ; advertiserData . serviceData . uriBeacon = uriBeacon ; }
Parse BLE advertiser UriBeacon data.
Parse BLE advertiser UriBeacon data .