HomeDocs
Skip to main content

dlt.setKeepScreenOn

Introduction

Sets whether to keep the screen on. It only takes effect in the current mini-program and becomes invalid after leaving the mini-program.

Parameters

Object object

PropertyTypeDefaultRequiredDescription
keepScreenOnBooleanYesWhether to keep the screen on
successfunctionNoCallback function for a successful API call
failfunctionNoCallback function for a failed API call
completefunctionNoCallback function for the end of an API call (executed regardless of success or failure)

Sample Code

dlt.setKeepScreenOn({
keepScreenOn: true,
success: function (res) {},
fail: function (res) {},
complete: function (res) {},
});
Privacy agreementDeveloper agreementcontact us: developer_service.mi@transsion.com © 2024 MiniApp. All Rights Reserved.