Skip to content

votrai123/react-native-open-settings-devices

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published