From: Piotr Czaja
BluetoothLEServiceData(DOMString uuid, DOMString data);
BluetoothLEServiceData(DOMString uuid, DOMString data);+
Code example:
// Creates a serviceData. + var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811"); +
Code example:
// Creates a serviceData. + var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811"); + service.uuid = "f236-41a4"; ++
Code example:
// Creates a serviceData. + var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811"); + service.data = "0x1815"; ++
Code example:
// Creates a manufacturerData. + var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057"); + manufacturer.id = "129"; ++
Code example:
// Creates a manufacturerData. + var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057"); + manufacturer.data = "0x0059" ++
Code example:
var advertData = { includeName : false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"], + appearance: 192, includeTxPowerLevel: false } ++
Code example:
var advertData = { includeName : false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"], + appearance: 192, includeTxPowerLevel: false } + var advertise = new tizen.BluetoothLEAdvertiseData(advertData); ++
BluetoothLEAdvertiseData(optional BluetoothLEAdvertiseDataInit? init);
Code example:
var advertise = new tizen.BluetoothLEAdvertiseData(); + advertise.includeName = true; ++
Code example:
var advertise = new tizen.BluetoothLEAdvertiseData(); + advertise.uuids = ["180d"]; ++
Code example:
var advertise = new tizen.BluetoothLEAdvertiseData(); + advertise.solicitationuuids = ["180f"]; ++
Code example:
var advertise = new tizen.BluetoothLEAdvertiseData(); + advertise.appearance = 192; ++
Code example:
var advertise = new tizen.BluetoothLEAdvertiseData(); + advertise.includeTxPowerLevel = true; ++
Code example:
var advertise = new tizen.BluetoothLEAdvertiseData(); + var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811"); + advertise.serviceData = service; ++
Code example:
var advertise = new tizen.BluetoothLEAdvertiseData(); + var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057"); + advertise.manufacturerData = manufacture; ++
Code example:
console.log(tizen.bluetooth.deviceMajor); ++
Code example:
console.log(tizen.bluetooth.deviceMinor); ++
Code example:
console.log(tizen.bluetooth.deviceService); ++
Code example:
var adapter = null; - try { - adapter = tizen.bluetooth.getDefaultAdapter() ; +Code example:
try { + var adapter = tizen.bluetooth.getDefaultAdapter() ; } catch (err) { console.log (err.name +": " + err.message); } @@ -863,9 +951,8 @@ Instead, use http://tizen.org/privilege/bluetooth.
Code example:
var adapter = null; - try { - adapter = tizen.bluetooth.getLEAdapter(); +Code example:
try { + var adapter = tizen.bluetooth.getLEAdapter(); } catch (err) { console.log(err.name +": " + err.message); } @@ -2469,6 +2556,22 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 ++Code example:
function onconnected(device) { + console.log("Connected to device"); + var service = device.getService(device.uuids[0]); + console.log("Service got"); + } + + var adapter = tizen.bluetooth.getLEAdapter(); + adapter.startScan( + function onsuccess(device) { + console.log("[Found device] address: " + device.address); + device.connect(onconnected.bind(null, device), onerror); + }); + ++@@ -2918,6 +3043,9 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 +Attributes
@@ -2481,6 +2584,12 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 +
+Code example:
var service = device.getService(device.uuids[0]); + console.log("Service UUID " + service.uuid); + ++- readonly @@ -2492,6 +2601,14 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 +
+Code example:
var service = device.getService(device.uuids[0]); + for( var i = 0; i service.services.length; ++i) { + console.log("Subservices UUID " + service.services[i].uuid); + } + ++- readonly @@ -2503,6 +2620,14 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 +
+Code example:
var service = device.getService(device.uuids[0]); + for( var i = 0; i service.characteristics.length; ++i) { + console.log("Subservices UUID " + service.characteristics[i].isWritable); + } + ++Remark : + Example of using can be find at addValueChangeListener code example. +
Parameters:
@@ -3158,6 +3286,9 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 +
Remark : + Example of using can be find at startScan code example. +
Methods
@@ -3198,6 +3329,9 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 +
Remark : + Example of using can be find at startAdvertise code example. +
Methods
@@ -3240,6 +3374,9 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 +
Remark : + Example of using can be find at addConnectStateChangeListener code example. +
Methods
@@ -3300,6 +3437,9 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.3.1 +
Remark : + Example of using can be find at BluetoothGATTCharacteristic.readValue() and BluetoothGATTDescriptor.readValue() code examples. +
Methods
@@ -5245,6 +5385,10 @@ Instead, use http://tizen.org/privilege/bluetooth. function healthConnectSuccess(channel) { console.log("Health device is connected"); + var status = "Name of remote device: " + channel.peer.name + + "channel type of device profile: " + channel.channelType + + "health application name: " + channel.appication.name; + console.log(status); } function healthConnectError(e) { @@ -5831,6 +5975,9 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 2.2 +
Remark : + Example of using can be find at setChangeListener code example. +
Methods
@@ -5918,6 +6065,9 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 1.0 +
Remark : + Example of using can be find at getDevice and createBonding code examples. +
Methods
@@ -5959,6 +6109,9 @@ Instead, use http://tizen.org/privilege/bluetooth. Since: 1.0 +
Remark : + Example of using can be find at getKnownDevices code example. +
Methods
@@ -6004,6 +6157,9 @@ Each element is a BluetoothDevice. Since: 1.0 +
Remark : + Example of using can be find at discoverDevices code example. +
Methods
@@ -6106,6 +6262,9 @@ After that, this device is no longer visible. Since: 1.0 +
Remark : + Example of using can be find at connectToServiceByUUID code example. +
Methods
@@ -6147,6 +6306,9 @@ After that, this device is no longer visible. Since: 1.0 +
Remark : + Example of using can be find at registerRFCOMMServiceByUUID code example. +
Methods
@@ -6188,6 +6350,9 @@ After that, this device is no longer visible. Since: 2.2 +
Remark : + Example of using can be find at registerSinkApplication code example. +
Methods
@@ -6229,6 +6394,9 @@ After that, this device is no longer visible. Since: 2.2 +
Remark : + Example of using can be find at connectToSource code example. +
Methods
@@ -6272,6 +6440,9 @@ After that, this device is no longer visible. Since: 2.2 +
Remark : + Example of using can be find at setListener code example. +
Methods