{"repo":"rmrs/react-native-settings","free":true,"listed":false,"github":"https://github.com/rmrs/react-native-settings","clone":"git clone https://github.com/rmrs/react-native-settings.git","description":"Allows access to various Android and iOS device settings using React Native","language":"Java","stars":227,"topics":["react-native","settings","android","xcode"],"license":"MIT","category":"mobile-apps","readme_excerpt":"react-native-settings We created this module to allow us to query for specific device settings. For example we wanted to know if the GPS is on/off without using 'react-native' 'geolocation' since using it will trigger a permission pop up. We wanted to make the distinction between the two: 1. Permission is not allowed for our application. 2. Setting is disabled for the entire device. This way we can prompt the user to go to the correct place in the settings application and make sure our application is aware that the user disables/enables a setting or denies/grants a permission. Currently we've only added a way to extract the 'location' setting (and airplane mode on Android). We will add more in the future based on requirements. react-native example for both Android and iOS. Getting started $ npm install react-native-settings --save Mostly automatic installation $ react-native link react-native-settings Android In your MainApplication.java file register the receivers: Manual installation iOS 1. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] 2. Go to node modules ➜ react-native-settings and add RNSettings.xcodeproj 3. In XCode, in the project navigator, select your project. Add libRNSettings.a to your project's Build Phases ➜ Link Binary With Libraries 4. Run your project ( Cmd+R )< Android 1. Open up android/app/src/main/java/[...]/MainApplication.java - Add import io.rumors.reactnativesettings.RNSettingsPackage; to the imports at","default_branch":null,"files":null,"tree":[],"storefront":"/r/rmrs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rmrs/react-native-settings/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}