react-native-developer-options-android
v1.1.0
Published
Check if the Android device has the developer options enabled.
Downloads
1
Maintainers
Readme
react-native-developer-options-android
Check if the Android device has the developer options enabled.
Developed By
Installation
npm install react-native-developer-options-android
Usage
import * as React from 'react';
import { StyleSheet, View, Text } from 'react-native';
import { isDeveloperOptionsEnabled } from 'react-native-developer-options-android';
export default function App() {
const [isDeveloperOptionsOn, setIsDeveloperOptionsOn] = React.useState<boolean | undefined>();
React.useEffect(() => {
isDeveloperOptionsEnabled(handleResult)
}, []);
const handleResult = (isEnabled: boolean) => {
console.log('Developer Options Enabled', isEnabled);
setIsDeveloperOptionsOn(isEnabled)
};
return (
<View style={styles.container}>
<Text>isDeveloperOptionsEnabled: {String(isDeveloperOptionsOn)}</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
box: {
width: 60,
height: 60,
marginVertical: 20,
},
});
License
MIT
Made with create-react-native-library