https://github.com/jhen0409/react-native-devsettings-android
The Android implementation for iOS `NativeModules.DevSettings` of React Native.
https://github.com/jhen0409/react-native-devsettings-android
Last synced: 3 days ago
JSON representation
The Android implementation for iOS `NativeModules.DevSettings` of React Native.
- Host: GitHub
- URL: https://github.com/jhen0409/react-native-devsettings-android
- Owner: jhen0409
- License: mit
- Created: 2017-08-23T12:06:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-01-11T04:55:07.000Z (over 3 years ago)
- Last Synced: 2025-09-07T18:52:50.203Z (about 1 month ago)
- Language: Java
- Homepage:
- Size: 503 KB
- Stars: 24
- Watchers: 3
- Forks: 9
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# react-native-devsettings-android
The Android implementation for iOS [`NativeModules.DevSettings`](https://github.com/facebook/react-native/blob/6ad7e8281b37ee2ce6425363c0b17420d056807a/React/Modules/RCTDevSettings.mm#L231-L330) of React Native.
__*DEPRECATED NOTE*__ The DevSettings implementation for Android have been landed in React Native v0.60.
## Installation
```bash
$ npm install --save react-native-devsettings-android
$ react-native link react-native-devsettings-android
```## Usage
These methods are only for debug mode, doesn't effect in release mode.
```js
import { NativeModules } from 'react-native'// Methods
NativeModules.DevSettings.reload()
NativeModules.DevSettings.toggleElementInspector()
NativeModules.DevSettings.setIsDebuggingRemotely(bool)
NativeModules.DevSettings.setLiveReloadEnabled(bool)
NativeModules.DevSettings.setHotLoadingEnabled(bool)// Extra method that haven't on iOS
NativeModules.DevSettings.show()
```Doesn't support the following methods:
```js
NativeModules.DevSettings.setIsShakeToShowDevMenuEnabled(bool)
NativeModules.DevSettings.setProfilingEnabled(bool)
```## Related projects
- [react-native-debugger](https://github.com/jhen0409/react-native-debugger) used `DevSettings` to provide [dev menu](https://github.com/jhen0409/react-native-debugger/blob/master/docs/shortcut-references.md#context-menu)
## License
[MIT](LICENSE.md)