Skip to content

Abra configuraciones específicas de Android para su aplicación de React Native.

License

Notifications You must be signed in to change notification settings

Nahugonza/RN-Open-especifics-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Abra configuraciones específicas de Android para su aplicación de React Native.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published