Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试决定是否应该使用 PhoneGap 或 Trigger.io 来开发我即将构建的移动应用程序。“必备”之一是禁用显示睡眠的能力。我已经看到了各种针对 PhoneGap ( idleTimerDisabled) 的 hack,甚至还有一个可以让您直接从 JS 控制它的插件,但是我还没有在 Trigger.io 中找到关于这个主题的任何内容。
idleTimerDisabled
那么,有可能吗?
您应该能够为 Android 和 iOS 编写本机插件来禁用设备睡眠。以下是有用的链接,可以帮助您走上正确的道路:
Trigger.io 原生插件
iOS:如何停止设备待机计时器?
停止 android 设备休眠