1.0.2 • Published 3 months ago

react-native-open-settings-devices v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

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

  1. Use to open setting platform Android and IOS
import { openSettings, ESettings } from 'react-native-open-settings-devices';


// Example
openSettings(ESettings.GENERAL);
  1. Use to open location service for Android
import { locationSettings } from 'react-native-open-settings-devices';

// Example
locationSettings();
  1. 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 Example for android

IOS

Example for 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

1.0.2

3 months ago

1.0.1

11 months ago

1.0.0

11 months ago