HomeDocs
Skip to main content

dlt.getBLEDeviceServices

Introduction​

Gets the service UUIDs of the device.

Parameters​

Object object​

PropertyTypeDefaultRequiredDescription
successfunctionNoCallback function called when the interface is successfully invoked.
failfunctionNoCallback function called when the interface invocation fails.
completefunctionNoCallback function called when the interface invocation is complete (called whether the invocation is successful or not).

object.success Callback Function​

Parameters​

Object res​

PropertyTypeDescription
successstringtrue - Success
servicesstring[]Service UUIDs

object.fail Callback Function​

Parameters​

Object res​

PropertyTypeDescription
successstringfalse - Failure

Sample Code​

dlt.getBLEDeviceServices({
success(res) {
console.log('getBLEDeviceServices success', res);
},
});

In the provided sample code, the getBLEDeviceServices function is called to retrieve the service UUIDs of the connected Bluetooth device. The success callback logs the result, which includes an array of service UUIDs.

Privacy agreementDeveloper agreementcontact us: developer_private.mi@dlightek.com © 2024 MiniApp. All Rights Reserved.