setIdleTimerDisabled 设置屏幕常亮

setIdleTimerDisabled ^5.7.0

插件调用setIdleTimerDisabled,原生APP定时60秒后重新开启系统自动屏灭的操作
(1) 假如插件要长时间保持屏亮,需要调用setIdleTimerDisabled后,隔60秒后再次调用来维持一直屏亮
(2) 插件调用setIdleTimerDisabled,间隔不到60秒又调用setIdleTimerDisabled,原生app的定时时间,重新设置,60秒后再重新启动系统的自动灭屏操作
(3) 如果是黑屏状态,调用这个接口,屏幕会亮起

#接口调用示例

this.$bridge
    .subscribeMessage()
    .then(res => {    
        this.$alert(res)
    })
    .catch(err => {
        this.$toast(err)
    })
posted on 2024-12-16 09:43  AtlasLapetos  阅读(18)  评论(0)    收藏  举报