Exemplo n.º 1
0
 /**
  * Instantiates a new Bluetooth LE device Ad Record Store.
  *
  * @param adRecords the ad records
  */
 public AdRecordStore(final SparseArray<AdRecord> adRecords) {
   mAdRecords = adRecords;
   mLocalNameComplete =
       AdRecordUtil.getRecordDataAsString(
           mAdRecords.get(AdRecord.BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME));
   mLocalNameShort =
       AdRecordUtil.getRecordDataAsString(
           mAdRecords.get(AdRecord.BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME));
 }
Exemplo n.º 2
0
 /**
  * Gets the record data as string.
  *
  * @param record the record
  * @return the record data as string
  */
 public String getRecordDataAsString(final int record) {
   return AdRecordUtil.getRecordDataAsString(mAdRecords.get(record));
 }