Skip to main content
Get detailed information about the device, system, and Mini Program environment.

Parameters

PropertyTypeRequiredDescription
successFunctionNoCallback with system info
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback

PropertyTypeDescription
brandStringDevice brand
modelStringDevice model
systemStringOS version
platformStringPlatform (iOS/Android)
versionStringMini Program version
screenWidthNumberScreen width in px
screenHeightNumberScreen height in px
windowWidthNumberWindow width in px
windowHeightNumberWindow height in px
statusBarHeightNumberStatus bar height in px
languageStringSystem language

Code Example

my.getSystemInfo({
  success: (res) => {
    console.log('Device:', res.brand, res.model);
    console.log('System:', res.system);
    console.log('Screen:', res.screenWidth, 'x', res.screenHeight);
  }
});