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