added BeaconDevice Interface

This commit is contained in:
Alexandros Schillings
2015-07-13 18:08:59 +01:00
parent 201e4a6129
commit cb43be74ef
2 changed files with 15 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
package uk.co.alt236.bluetoothlelib.device.beacon;
/**
*
*/
public interface BeaconDevice {
BeaconType getBeaconType();
}

View File

@@ -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.
*