-
Notifications
You must be signed in to change notification settings - Fork 1
Encounter
Thomas Schwotzer edited this page Aug 27, 2021
·
4 revisions
Android devices often provide a set of point-to-point protocols. Those protocols can easily managed from you activities if they derive from ASAPActivity.
YourActivity extends ASAPActivity {
...
this.startBluetooth();
this.stopBluetooth();
}Bluetooth is switched on or off. This library will initiate an ASAP encounter whenever a paired device comes close.
YourActivity extends ASAPActivity {
...
this.startBluetoothDiscoverable();
this.startBluetoothDiscovery();
}This device becomes discoverable or starts discovering other devices in it surrounding. Both actions stop automatically after about a minute.
YourActivity extends ASAPActivity {
...
this.isBluetoothDiscoverable()
this.isBluetoothDiscovery()
this.isBluetoothEnvironmentOn()
}You activity can check Bluetooth related status.