public class ConfigurableBeacon extends Beacon
Modifier and Type | Class and Description |
---|---|
static interface |
ConfigurableBeacon.ConfigurableBeaconListener |
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<ConfigurableBeacon> |
CREATOR |
static int |
STATE_AUTHENTICATING |
static int |
STATE_CONNECTED |
static int |
STATE_CONNECTING |
static int |
STATE_DISCONNECTED |
static int |
STATE_DISCOVERING |
static int |
STATE_FIRMWARE_UPDATE |
static int |
STATE_READING |
static int |
STATE_WRITING |
Modifier and Type | Method and Description |
---|---|
void |
connect(android.content.Context context,
java.lang.String password,
ConfigurableBeacon.ConfigurableBeaconListener listener)
Initiates a connection attempt to the beacon
|
int |
describeContents() |
void |
disconnect()
Disconnect from a currently connected beacon
|
void |
enableBeaconSpeakerAndLed(boolean speaker,
boolean led)
Turns on the beacon's speaker or led if it has one, requires a connection
|
BeaconConfiguration |
getBeaconConfiguration() |
int |
getConnectionState() |
java.lang.String |
getTypeString()
Gets the type of this beacon as a string
|
void |
setConfiguration(BeaconConfiguration configuration)
Sets a configuration to the beacon.
|
void |
setNewBeaconPassword(java.lang.String password,
CommandCompletion completion)
Sets a beacon's password, overrides any current password, requires a connection
|
void |
writeToParcel(android.os.Parcel parcel,
int i) |
equals, getBluetoothDevice, getDistance, getLastSeen, getName, getRSSI, getTransmissionPower, getVisibilityTimeoutInterval, hashCode, isVisible, setLastSeen, setRSSI, setVisibilityTimeoutInterval, updateProperties
public static final int STATE_DISCONNECTED
public static final int STATE_CONNECTING
public static final int STATE_CONNECTED
public static final int STATE_DISCOVERING
public static final int STATE_AUTHENTICATING
public static final int STATE_READING
public static final int STATE_WRITING
public static final int STATE_FIRMWARE_UPDATE
public static final android.os.Parcelable.Creator<ConfigurableBeacon> CREATOR
public java.lang.String getTypeString()
Beacon
getTypeString
in class Beacon
public void connect(@NonNull android.content.Context context, @Nullable java.lang.String password, @NonNull ConfigurableBeacon.ConfigurableBeaconListener listener)
context
- a contextpassword
- a password that the beacon might havelistener
- a listener for events to be fired on ConfigurableBeacon.ConfigurableBeaconListener
public void setConfiguration(BeaconConfiguration configuration)
configuration
- the BeaconConfiguration
to be applied to this beaconpublic void enableBeaconSpeakerAndLed(boolean speaker, boolean led)
speaker
- led
- public void setNewBeaconPassword(@Nullable java.lang.String password, @Nullable CommandCompletion completion)
password
- completion
- public void disconnect()
public int describeContents()
describeContents
in interface android.os.Parcelable
describeContents
in class Beacon
public void writeToParcel(android.os.Parcel parcel, int i)
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class Beacon
public int getConnectionState()
@Nullable public BeaconConfiguration getBeaconConfiguration()