react-native-open-settings-devices
v1.0.2
Published
The library is used to open settings for platform Android and IOS, and it uses for React Native
Downloads
200
Readme
react-native-open-settings-devices
The library is used to open settings for platform Android and IOS, and it uses for React Native
Installation
npm install react-native-open-settings-devices
Or:
yarn add react-native-open-setting-devices
Usage
- Use to open setting platform Android and IOS
import { openSettings, ESettings } from 'react-native-open-settings-devices';
// Example
openSettings(ESettings.GENERAL);
- Use to open location service for Android
import { locationSettings } from 'react-native-open-settings-devices';
// Example
locationSettings();
- Use to check location service enable for IOS
import { checkAllowLocationServices } from 'react-native-open-settings-devices';
// Example
const openLocationSettins = async () => {
const result = await checkAllowLocationServices();
return result;
}
Example
ANDROID
IOS
Related
For IOS: https://gist.github.com/deanlyoung/368e274945a6929e0ea77c4eca345560
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library