React Native module for keeping the phone screen alive
based on the work from https://github.com/corbt/react-native-keep-awake
npm install @unsw-gsbme/react-native-keep-awake
yarn add @unsw-gsbme/react-native-keep-awake
import { KeepAwake } from '@unsw-gsbme/react-native-keep-awake';
// ...
export default function App() {
return (
<View style={styles.container}>
<Text>Screen will never sleep :)</Text>
<KeepAwake />
</View>
);
}
import { useKeepAwake } from '@unsw-gsbme/react-native-keep-awake';
// ...
export default function App() {
useKeepAwake();
return (
<View style={styles.container}>
<Text>Screen will never sleep :)</Text>
</View>
);
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT