发帖
充值
 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
3 0

判断屏幕是否点亮状态

问答专区 2957 3 2023-3-20 06:04:34
  1. function _检测屏幕是否亮屏()
  2. import('com.nx.assist.lua.LuaEngine')
  3. local context = LuaEngine.getContext()
  4. local thisServer = context.getSystemService(context.POWER_SERVICE)
  5. local isOn = false
  6. xpcall(function()
  7. if thisServer.isScreenOn()then isOn = true; end
  8. end,function()
  9. if thisServer.isInteractive() then  isOn = true; end
  10. end)
  11. return isOn
  12. end
复制代码


使用道具 举报

2023-3-20 06:06:28
_检测屏幕是否亮屏()
2023-3-30 20:02:36
终于可以发帖了
2023-7-22 23:58:49
来学习一下
您需要登录后才可以回帖 立即登录
高级模式
返回
问答专区