Bluetooth Application Control
How to discover available Bluetooth devices and get their Bluetooth profile details.
- using aliased application ID of "tizen.bluetooth".
- supports the http://tizen.org/appcontrol/operation/bluetooth/pick operation only.
var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/bluetooth/pick");
var appControlReplyCallback = {
onsuccess: function(data) {
console.log("success reply");
for(var i=0;i<data.length;i++) {
if(data[i].key === "http://tizen.org/appcontrol/data/bluetooth/name") {
console.log(data[i].value);
}
}
},
onfailure: function() {
console.log("fail reply");
}
};
tizen.application.launchAppControl(appControl, "tizen.bluetooth",
function() {
console.log("launch appControl succeeded");
}, function(e) {
/* Error handling */
}, appControlReplyCallback);