|
native BluetoothType | getBluetoothType () |
|
BluetoothObject | find (BluetoothType type, String name, String identifier, BluetoothObject parent, Duration timeout) |
|
BluetoothObject | find (BluetoothType type, String name, String identifier, BluetoothObject parent) |
|
BluetoothObject | getObject (BluetoothType type, String name, String identifier, BluetoothObject parent) |
|
List< BluetoothObject > | getObjects (BluetoothType type, String name, String identifier, BluetoothObject parent) |
|
native List< BluetoothAdapter > | getAdapters () |
|
native List< BluetoothDevice > | getDevices () |
|
native List< BluetoothGattService > | getServices () |
|
native boolean | setDefaultAdapter (BluetoothAdapter adapter) |
|
native boolean | startDiscovery () throws BluetoothException |
|
native boolean | stopDiscovery () throws BluetoothException |
|
native boolean | getDiscovering () throws BluetoothException |
|
void | startNearbyDiscovery (final BluetoothDeviceDiscoveryListener listener, final int pollingRate, final boolean onlyManufacturerFilled) |
|
void | stopNearbyDiscovery () |
|
Find a BluetoothObject of a type matching type. If parameters name, identifier and parent are not null, the returned object will have to match them. It will first check for existing objects. It will not turn on discovery or connect to devices. type specify the type of the object you are waiting for, NONE means anything. name optionally specify the name of the object you are waiting for (for Adapter or Device) identifier optionally specify the identifier of the object you are waiting for (UUID for GattService, GattCharacteristic or GattDescriptor, address for Adapter or Device) parent optionally specify the parent of the object you are waiting for timeout the function will return after timeout time, a value of zero means wait forever. If object is not found during this time null will be returned.
- Returns
- An object matching the name, identifier, parent or null if not found before timeout expires or event is canceled.
Find a BluetoothObject of a type matching type. If parameters name, identifier and parent are not null, the returned object will have to match them. It will first check for existing objects. It will not turn on discovery or connect to devices. type specify the type of the object you are waiting for, NONE means anything. name optionally specify the name of the object you are waiting for (for Adapter or Device) identifier optionally specify the identifier of the object you are waiting for (UUID for GattService, GattCharacteristic or GattDescriptor, address for Adapter or Device) parent optionally specify the parent of the object you are waiting for
- Returns
- An object matching the name, identifier and parent.
Returns a list of BluetoothAdapters available in the system
- Returns
- A list of BluetoothAdapters available in the system
Returns a list of discovered BluetoothDevices
- Returns
- A list of discovered BluetoothDevices
Returns if the discovers is running or not.
- Returns
- TRUE if discovery is running
Return a BluetoothObject of a type matching type. If parameters name, identifier and parent are not null, the returned object will have to match them. Only objects which are already in the system will be returned. type specify the type of the object you are waiting for, NONE means anything. name optionally specify the name of the object you are waiting for (for Adapter or Device) identifier optionally specify the identifier of the object you are waiting for (UUID for GattService, GattCharacteristic or GattDescriptor, address for Adapter or Device) parent optionally specify the parent of the object you are waiting for
- Returns
- An object matching the name, identifier, parent or null if not found.
Return a List of BluetoothObject of a type matching type. If parameters name, identifier and parent are not null, the returned object will have to match them. Only objects which are already in the system will be returned. type specify the type of the object you are waiting for, NONE means anything. name optionally specify the name of the object you are waiting for (for Adapter or Device) identifier optionally specify the identifier of the object you are waiting for (UUID for GattService, GattCharacteristic or GattDescriptor, address for Adapter or Device) parent optionally specify the parent of the object you are waiting for
- Returns
- A vector of object matching the name, identifier, parent.
Returns a list of available BluetoothGattServices
- Returns
- A list of available BluetoothGattServices
native boolean tinyb.BluetoothManager.setDefaultAdapter |
( |
BluetoothAdapter |
adapter | ) |
|
Sets a default adapter to use for discovery.
- Returns
- TRUE if the device was set
Turns on device discovery on the default adapter if it is disabled.
- Returns
- TRUE if discovery was successfully enabled
void tinyb.BluetoothManager.startNearbyDiscovery |
( |
final BluetoothDeviceDiscoveryListener |
listener, |
|
|
final int |
pollingRate, |
|
|
final boolean |
onlyManufacturerFilled |
|
) |
| |
When called, each new device found will fire an event to the passed listener
This method will create a new thread to handle the discovery process which is a simple polling of the current list (getDevices)
The thread is stopped when the nearbyStopDiscovery is called
- Parameters
-
listener | |
pollingRate | The polling rate is miliseconds (1000 = 1s) |
onlyManufacturerFilled | If true, then only if the manufacturer data is filled, the event will be fired |
Turns off device discovery on the default adapter if it is enabled.
- Returns
- TRUE if discovery was successfully disabled
void tinyb.BluetoothManager.stopNearbyDiscovery |
( |
| ) |
|
The documentation for this class was generated from the following file:
- /iotdk/jenkins/workspace/tinyb-doc/java/BluetoothManager.java