HomeDocs
Skip to main content

dlt.getHardwareInfo

Introduction​

Get information about the hardware system of the phone.

Usage Limitations​

Supported in the basic library version 4.0.0 or higher.

Parameters​

Object object

PropertyTypeDefaultRequiredDescription
successfunctionNoCallback function for a successful API call.
failfunctionNoCallback function for a failed API call.
completefunctionNoCallback function for the completion of the API call (executed whether the call is successful or not).

object.success Callback Function​

Parameters​

Object res​

PropertyTypeDescription
successstringtrue - Successful retrieval.
memorySizenumberRunning memory information, in MB.
platformstringPlatform.

object.fail Callback Function​

Parameters​

Object res​

PropertyTypeDescription
successstringfalse - Retrieval failed.

Sample Code​

// pages/index/index.js
Page({
getHardwareInfo() {
dlt.getHardwareInfo({
success: (res) => {
console.log('hardwareInfo: ', res);
},
});
},
});
Privacy agreementDeveloper agreementcontact us: developer_private.mi@dlightek.com © 2024 MiniApp. All Rights Reserved.