| #
b41269b4 |
| 12-Jan-2023 |
Evan Bacon <[email protected]> |
Add web support to expo-keep-awake (#15826)
# Why
- Reimplements https://github.com/expo/expo/pull/9467 which is stale.
- Resolves https://github.com/expo/expo/issues/6889
<!--
Please descri
Add web support to expo-keep-awake (#15826)
# Why
- Reimplements https://github.com/expo/expo/pull/9467 which is stale.
- Resolves https://github.com/expo/expo/issues/6889
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
- `KeepAwake.activateKeepAwake` now returns a promise to accommodate
web.
- Added `KeepAwake.isAvailableAsync` which returns false on certain web
browsers.
- Added `KeepAwake.addListener` to observe state changes on web.
<!--
How did you build this feature or fix this bug and why?
-->
# Test Plan
<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] This diff will work correctly for `expo build` (eg: updated
`@expo/xdl`).
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
Co-authored-by: Expo Bot <[email protected]>
show more ...
|