Skip to content

Commit cb43be7

Browse files
committed
added BeaconDevice Interface
1 parent 201e4a6 commit cb43be7

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package uk.co.alt236.bluetoothlelib.device.beacon;
2+
3+
/**
4+
*
5+
*/
6+
public interface BeaconDevice {
7+
BeaconType getBeaconType();
8+
}

library/src/main/java/uk/co/alt236/bluetoothlelib/device/beacon/ibeacon/IBeaconDevice.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
import android.os.Parcel;
55

66
import uk.co.alt236.bluetoothlelib.device.BluetoothLeDevice;
7+
import uk.co.alt236.bluetoothlelib.device.beacon.BeaconDevice;
78
import uk.co.alt236.bluetoothlelib.device.beacon.BeaconType;
89
import uk.co.alt236.bluetoothlelib.device.beacon.BeaconUtils;
910

10-
public class IBeaconDevice extends BluetoothLeDevice {
11+
public class IBeaconDevice extends BluetoothLeDevice implements BeaconDevice{
1112

1213
/**
1314
* The m iBeacon data.
@@ -75,6 +76,11 @@ public double getAccuracy() {
7576
getRunningAverageRssi());
7677
}
7778

79+
@Override
80+
public BeaconType getBeaconType() {
81+
return BeaconType.IBEACON;
82+
}
83+
7884
/**
7985
* Gets the calibrated TX power of the iBeacon device as reported.
8086
*

0 commit comments

Comments
 (0)