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
Property | Type | Default | Required | Description |
---|---|---|---|---|
success | function | No | Callback function for a successful API call. | |
fail | function | No | Callback function for a failed API call. | |
complete | function | No | Callback function for the completion of the API call (executed whether the call is successful or not). |
object.success Callback Function
Parameters
Object res
Property | Type | Description |
---|---|---|
success | string | true - Successful retrieval. |
memorySize | number | Running memory information, in MB. |
platform | string | Platform. |
object.fail Callback Function
Parameters
Object res
Property | Type | Description |
---|---|---|
success | string | false - Retrieval failed. |
Sample Code
// pages/index/index.js
Page({
getHardwareInfo() {
dlt.getHardwareInfo({
success: (res) => {
console.log('hardwareInfo: ', res);
},
});
},
});