Java Code Examples for android.bluetooth.le.ScanRecord#getDeviceName()
The following examples show how to use
android.bluetooth.le.ScanRecord#getDeviceName() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: EFRConnect-android File: ScanRecordCompat.java License: Apache License 2.0 | 6 votes |
@TargetApi(Build.VERSION_CODES.LOLLIPOP) public static ScanRecordCompat from(Object lollipopScanRecord) { if (lollipopScanRecord == null) { return null; } sr = (ScanRecord) lollipopScanRecord; ScanRecordCompat retVal = new ScanRecordCompat(); retVal.advertiseFlags = sr.getAdvertiseFlags(); retVal.bytes = sr.getBytes(); retVal.deviceName = sr.getDeviceName(); retVal.manufacturerSpecificData = sr.getManufacturerSpecificData(); retVal.serviceData = sr.getServiceData(); retVal.serviceUuids = sr.getServiceUuids(); retVal.txPowerLevel = sr.getTxPowerLevel(); return retVal; }
Example 2
Source Project: AndroidBleManager File: ScanRecordCompat.java License: Apache License 2.0 | 5 votes |
@TargetApi(Build.VERSION_CODES.LOLLIPOP) ScanRecordCompat(ScanRecord record) { mServiceUuids = record.getServiceUuids(); mManufacturerSpecificData = record.getManufacturerSpecificData(); mServiceData = record.getServiceData(); mDeviceName = record.getDeviceName(); mAdvertiseFlags = record.getAdvertiseFlags(); mTxPowerLevel = record.getTxPowerLevel(); mBytes = record.getBytes(); }