rn-open-especifics-settings

2.3.2 • Public • Published

rn-open-especifics-settings

This module allows us to open device-specific settings. For example, if we want to open the GPS configuration to see if it is on / off or change it, or open the Location configuration window or Wifi, battery and others.

Getting started

$ npm install rn-open-especifics-settings --save

Mostly automatic installation

$ react-native link rn-open-especifics-settings

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesrn-open-especifics-settings and add RNOpenEspecificsSettings.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNOpenEspecificsSettings.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNOpenEspecificsSettingsPackage; to the imports at the top of the file
  • Add new RNOpenEspecificsSettingsPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':rn-open-especifics-settings'
    project(':rn-open-especifics-settings').projectDir = new File(rootProject.projectDir, 	'../node_modules/rn-open-especifics-settings/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':rn-open-especifics-settings')
    

Usage

Parameter options

  • 'general'
  • 'location'
  • 'network'
  • 'security'
  • 'deviceinfo'
  • 'backup'
  • 'sound'
  • 'home'
  • 'date'
  • 'applications'

Note: Due to major changes to the Apple device access policy, only access to the main menu is available.

import RNOpenEspecificsSettings from 'rn-open-especifics-settings';

// Opens the especific settings window, example: 'location'.
RNOpenEspecificsSettings.openSettings('location')

Credits

Written by [Flavio Teodosio] (bd-arc).

License

Package Sidebar

Install

npm i rn-open-especifics-settings

Weekly Downloads

2

Version

2.3.2

License

Apache-2.0

Unpacked Size

31.2 kB

Total Files

16

Last publish

Collaborators

  • nahugonza