added BeaconDevice Interface
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package uk.co.alt236.bluetoothlelib.device.beacon;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface BeaconDevice {
|
||||
BeaconType getBeaconType();
|
||||
}
|
||||
@@ -4,10 +4,11 @@ import android.bluetooth.BluetoothDevice;
|
||||
import android.os.Parcel;
|
||||
|
||||
import uk.co.alt236.bluetoothlelib.device.BluetoothLeDevice;
|
||||
import uk.co.alt236.bluetoothlelib.device.beacon.BeaconDevice;
|
||||
import uk.co.alt236.bluetoothlelib.device.beacon.BeaconType;
|
||||
import uk.co.alt236.bluetoothlelib.device.beacon.BeaconUtils;
|
||||
|
||||
public class IBeaconDevice extends BluetoothLeDevice {
|
||||
public class IBeaconDevice extends BluetoothLeDevice implements BeaconDevice{
|
||||
|
||||
/**
|
||||
* The m iBeacon data.
|
||||
@@ -75,6 +76,11 @@ public class IBeaconDevice extends BluetoothLeDevice {
|
||||
getRunningAverageRssi());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeaconType getBeaconType() {
|
||||
return BeaconType.IBEACON;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the calibrated TX power of the iBeacon device as reported.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user