This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo KeepAwake
一个 React 组件,可防止屏幕在渲染时休眠。
Android
iOS
tvOS
Web
Included in Expo Go
Recommended version:
~58.0.3
expo-keep-awake 提供了一个 React 钩子,用于防止屏幕进入睡眠状态,并提供一对函数以命令式地启用此行为。
安装
🌐 Installation
Terminal
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
🌐 Usage
例子:钩子
🌐 Example: hook
Keep Awake hook
示例:函数
🌐 Example: functions
Keep Awake functions
应用接口
🌐 API
import * as KeepAwake from 'expo-keep-awake';
No API data file found, sorry!