diff --git a/src/avoid-brightness-override.js b/src/avoid-brightness-override.js new file mode 100644 index 0000000..8de356b --- /dev/null +++ b/src/avoid-brightness-override.js @@ -0,0 +1,29 @@ +import React, { useEffect } from 'react'; +import { StyleSheet, View, Text } from 'react-native'; +import * as Brightness from 'expo-brightness'; + +export default function App() { + useEffect(() => { + (async () => { + const { status } = await Brightness.requestPermissionsAsync(); + if (status === 'granted') { + Brightness.setSystemBrightnessAsync(1); + } + })(); + }, []); + + return ( + + Brightness Module Example + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#fff', + alignItems: 'center', + justifyContent: 'center', + }, + }); \ No newline at end of file