|
| BluetoothObject (long instance) |
|
void | finalize () |
|
native String | getObjectPath () |
|
long | nativeInstance |
|
Provides access to Bluetooth devices. Follows the BlueZ adapter API available at: http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/device-api.txt
Cancels an initiated pairing operation
- Returns
- TRUE if the paring is cancelled successfully
A connection to this device is established, connecting each profile flagged as auto-connectable.
- Returns
- TRUE if the device connected
native boolean tinyb.BluetoothDevice.connectProfile |
( |
String |
arg_UUID | ) |
throws BluetoothException |
Connects a specific profile available on the device, given by UUID
- Parameters
-
arg_UUID | The UUID of the profile to be connected |
- Returns
- TRUE if the profile connected successfully
native void tinyb.BluetoothDevice.disableBlockedNotifications |
( |
| ) |
|
Disables notifications of the blocked property and unregisters the callback object passed through the corresponding enable method.
native void tinyb.BluetoothDevice.disableConnectedNotifications |
( |
| ) |
|
Disables notifications of the connected property and unregisters the callback object passed through the corresponding enable method.
native void tinyb.BluetoothDevice.disableManufacturerDataNotifications |
( |
| ) |
|
Disables notifications of the manufacturer data property and unregisters the callback object passed through the corresponding enable method.
native void tinyb.BluetoothDevice.disablePairedNotifications |
( |
| ) |
|
Disables notifications of the paired property and unregisters the callback object passed through the corresponding enable method.
native void tinyb.BluetoothDevice.disableRSSINotifications |
( |
| ) |
|
Disables notifications of the RSSI property and unregisters the callback object passed through the corresponding enable method.
native void tinyb.BluetoothDevice.disableServiceDataNotifications |
( |
| ) |
|
Disables notifications of the service data property and unregisters the callback object passed through the corresponding enable method.
native void tinyb.BluetoothDevice.disableServicesResolvedNotifications |
( |
| ) |
|
Disables notifications of the services resolved property and unregisters the callback object passed through the corresponding enable method.
native void tinyb.BluetoothDevice.disableTrustedNotifications |
( |
| ) |
|
Disables notifications of the trusted property and unregisters the callback object passed through the corresponding enable method.
The connection to this device is removed, removing all connected profiles.
- Returns
- TRUE if the device disconnected
native boolean tinyb.BluetoothDevice.disconnectProfile |
( |
String |
arg_UUID | ) |
throws BluetoothException |
Disconnects a specific profile available on the device, given by UUID
- Parameters
-
arg_UUID | The UUID of the profile to be disconnected |
- Returns
- TRUE if the profile disconnected successfully
native void tinyb.BluetoothDevice.enableBlockedNotifications |
( |
BluetoothNotification< Boolean > |
callback | ) |
|
Enables notifications for the blocked property and calls run function of the BluetoothNotification object.
- Parameters
-
callback | A BluetoothNotification<Boolean> object. Its run function will be called when a notification is issued. The run function will deliver the new value of the blocked property. |
native void tinyb.BluetoothDevice.enableConnectedNotifications |
( |
BluetoothNotification< Boolean > |
callback | ) |
|
Enables notifications for the connected property and calls run function of the BluetoothNotification object.
- Parameters
-
callback | A BluetoothNotification<Boolean> object. Its run function will be called when a notification is issued. The run function will deliver the new value of the connected property. |
native void tinyb.BluetoothDevice.enableManufacturerDataNotifications |
( |
BluetoothNotification< Map< Short, byte[]> > |
callback | ) |
|
Enables notifications for the manufacturer data property and calls run function of the BluetoothNotification object.
- Parameters
-
callback | A BluetoothNotification<Map<Short, byte[]> > object. Its run function will be called when a notification is issued. The run function will deliver the new value of the manufacturer data property. |
Enables notifications for the paired property and calls run function of the BluetoothNotification object.
- Parameters
-
callback | A BluetoothNotification<Boolean> object. Its run function will be called when a notification is issued. The run function will deliver the new value of the paired property. |
Enables notifications for the RSSI property and calls run function of the BluetoothNotification object.
- Parameters
-
callback | A BluetoothNotification<Short> object. Its run function will be called when a notification is issued. The run function will deliver the new value of the RSSI property. |
native void tinyb.BluetoothDevice.enableServiceDataNotifications |
( |
BluetoothNotification< Map< String, byte[]> > |
callback | ) |
|
Enables notifications for the service data property and calls run function of the BluetoothNotification object.
- Parameters
-
callback | A BluetoothNotification<Map<String, byte[]> > object. Its run function will be called when a notification is issued. The run function will deliver the new value of the service data property. |
native void tinyb.BluetoothDevice.enableServicesResolvedNotifications |
( |
BluetoothNotification< Boolean > |
callback | ) |
|
Enables notifications for the services resolved property and calls run function of the BluetoothNotification object.
- Parameters
-
callback | A BluetoothNotification<Boolean> object. Its run function will be called when a notification is issued. The run function will deliver the new value of the services resolved property. |
native void tinyb.BluetoothDevice.enableTrustedNotifications |
( |
BluetoothNotification< Boolean > |
callback | ) |
|
Enables notifications for the trusted property and calls run function of the BluetoothNotification object.
- Parameters
-
callback | A BluetoothNotification<Boolean> object. Its run function will be called when a notification is issued. The run function will deliver the new value of the trusted property. |
Find a BluetoothGattService. If parameter UUID is not null, the returned object will have to match it. It will first check for existing objects. It will not turn on discovery or connect to devices. UUID optionally specify the UUID of the BluetoothGattService 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 UUID or null if not found before timeout expires or event is canceled.
Find a BluetoothGattService. If parameter UUID is not null, the returned object will have to match it. It will first check for existing objects. It will not turn on discovery or connect to devices. UUID optionally specify the UUID of the BluetoothGattService you are waiting for
- Returns
- An object matching the UUID or null if not found before timeout expires or event is canceled.
Returns the adapter on which this device was discovered or connected.
- Returns
- The adapter.
native String tinyb.BluetoothDevice.getAddress |
( |
| ) |
|
Returns the hardware address of this device.
- Returns
- The hardware address of this device.
native String tinyb.BluetoothDevice.getAlias |
( |
| ) |
|
Returns an alternative friendly name of this device.
- Returns
- The alternative friendly name of this device, or NULL if not set.
native short tinyb.BluetoothDevice.getAppearance |
( |
| ) |
|
Returns the appearance of the device, as found by GAP service.
- Returns
- The appearance of the device, as found by GAP service.
native boolean tinyb.BluetoothDevice.getBlocked |
( |
| ) |
|
Returns the blocked state the device.
- Returns
- The blocked state of the device.
native int tinyb.BluetoothDevice.getBluetoothClass |
( |
| ) |
|
Returns the Bluetooth class of the device.
- Returns
- The Bluetooth class of the device.
native boolean tinyb.BluetoothDevice.getConnected |
( |
| ) |
|
Returns the connected state of the device.
- Returns
- The connected state of the device.
native String tinyb.BluetoothDevice.getIcon |
( |
| ) |
|
Returns the proposed icon name of the device.
- Returns
- The proposed icon name, or NULL if not set.
native boolean tinyb.BluetoothDevice.getLegacyPairing |
( |
| ) |
|
Returns if device uses only pre-Bluetooth 2.1 pairing mechanism.
- Returns
- True if device uses only pre-Bluetooth 2.1 pairing mechanism.
native Map<Short, byte[]> tinyb.BluetoothDevice.getManufacturerData |
( |
| ) |
|
Returns a map containing manufacturer specific advertisement data. An entry has a uint16_t key and an array of bytes.
- Returns
- manufacturer specific advertisement data.
native String tinyb.BluetoothDevice.getModalias |
( |
| ) |
|
Returns the local ID of the adapter.
- Returns
- The local ID of the adapter.
native String tinyb.BluetoothDevice.getName |
( |
| ) |
|
Returns the remote friendly name of this device.
- Returns
- The remote friendly name of this device, or NULL if not set.
native boolean tinyb.BluetoothDevice.getPaired |
( |
| ) |
|
Returns the paired state the device.
- Returns
- The paired state of the device.
native short tinyb.BluetoothDevice.getRSSI |
( |
| ) |
|
Returns the Received Signal Strength Indicator of the device.
- Returns
- The Received Signal Strength Indicator of the device.
native Map<String, byte[]> tinyb.BluetoothDevice.getServiceData |
( |
| ) |
|
Returns a map containing service advertisement data. An entry has a UUID string key and an array of bytes.
- Returns
- service advertisement data.
Returns a list of BluetoothGattServices available on this device.
- Returns
- A list of BluetoothGattServices available on this device, NULL if an error occurred
native boolean tinyb.BluetoothDevice.getServicesResolved |
( |
| ) |
|
Returns true if service discovery has ended.
- Returns
- true if the service discovery has ended.
native boolean tinyb.BluetoothDevice.getTrusted |
( |
| ) |
|
Returns the trusted state the device.
- Returns
- The trusted state of the device.
native short tinyb.BluetoothDevice.getTxPower |
( |
| ) |
|
Returns the transmission power level (0 means unknown).
- Returns
- the transmission power level (0 means unknown).
native String [] tinyb.BluetoothDevice.getUUIDs |
( |
| ) |
|
Returns the UUIDs of the device.
- Returns
- Array containing the UUIDs of the device, ends with NULL.
A connection to this device is established, and the device is then paired.
- Returns
- TRUE if the device connected and paired
Remove this device from the system (like an unpair).
- Returns
- TRUE if the device has been removed
- Exceptions
-
native void tinyb.BluetoothDevice.setAlias |
( |
String |
value | ) |
|
Sets an alternative friendly name of this device.
native void tinyb.BluetoothDevice.setBlocked |
( |
boolean |
value | ) |
|
Sets the blocked state the device.
native void tinyb.BluetoothDevice.setTrusted |
( |
boolean |
value | ) |
|
Sets the trusted state the device.
The documentation for this class was generated from the following file:
- /iotdk/jenkins/workspace/tinyb-doc/java/BluetoothDevice.java