react-native-dev-menu-on-touch
react-native-dev-menu-on-touch copied to clipboard
Android support?
Is it correct, that this module doesn't work for Android? I couldn't find anything in your README that said so.
I get null is not an object (evaluating 'DevMenu.show')
and when looking into NativeModules
it looks like DevMenu
is only available on iOS.
I'd be happy to add it, but I don't know if there is a way to do that on Android
If you install the react-native-dev-menu-android you adds a bridge of the DevMenu to react native in Android.
I developed a similar library to this one that forced me to develop this native module to provide compatibility with android.
Doing this provides access to the dev menu and the method to open a dev menu.
ReactApplication application = (ReactApplication)getReactApplicationContext()
.getCurrentActivity()
.getApplication();
mDevMenu = application
.getReactNativeHost()
.getReactInstanceManager()
.getDevSupportManager();
...
mDevMenu.showDevOptionsDialog(); // Here
Using this on a menu modification I made to allow me to add anything I want to the developer menu and also have it work in QA builds if need be.