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