react-native-community / discussions-and-proposals

Discussions and proposal related to the main React Native project
https://facebook.github.io/react-native/
1.64k stars 124 forks source link

API to detect if 'Developer Options' are enabled in Android #746

Open Yandamuri opened 6 months ago

Yandamuri commented 6 months ago

Now a days many end users(Non Developers) are enabling Developer Options in their Androidmobiles. Mostly people are enabling Developer Options to set the mock location app. Though setting Mock location option was provided for developer for testing purpose, Many end users are using it extensively in a wrong way like sales or marketing people are mocking their location without going to that particular location. Preventing such a things in app is a big challenge for developer.

My proposal here is If react-native can provide an API to detect if Developer Options are enabled, it would be useful for developer to prevent things like using mock location apps.

liamjones commented 6 months ago

This already exists in community modules: https://github.com/GantMan/jail-monkey

Yandamuri commented 6 months ago

@liamjones This library doesn't seem like actively maintained. Many unresolved issues were there.