Version: Smart Feature Phone 2.5

BluetoothDevice.fetchUuids()

Description#

The method fetches the up-to-date UUID list of services that the device provides. If the fetchUuids operation succeeds, an onattributechanged would be triggered right before the Promise is resolved to indicate device.uuids has changed.

Return#

A Promise to indicate whether the operation is resolved or rejected. If the Promise is resolved, it returns a DOMString array representing the updated list of UUIDs.

Sample#

device.fetchUuids().then ( function onResolve(uuids) {
console.log("Resolved with uuids:");
for (var i = 0; i < uuids.length; i++) {
console.log("uuid", i, "is", uuids[i]);
}
}, function onReject(aReason) {
console.log("Rejected with this reason: " + aReason);
});