🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-native-device-settings

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-device-settings

simple platform agnostic API to open device settings menus in react native

1.2.0
latest
Source
npm
Version published
Weekly downloads
332
32.27%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-device-settings

React Native simple platform agnostic API to open up device settings menus

Install

npm install react-native-device-settings --save

Automatic Install

react-native link react-native-device-settings

Manual Install

iOS

-NA: using Linking RN library. URLs applicable for IOS 10.

Android

  • In settings.gradle, insert the following code:

    include ':react-native-device-settings'
    project(':react-native-device-settings').projectDir = new File(settingsDir, '../node_modules/react-native-device-settings/android')
    
  • In build.gradle, insert the following code:

    android {
      ...
    }
    ...
    
    dependencies {
      ...
    + compile project(':react-native-device-settings')
    }
    ...
    
  • Edit MainActivity.java to look like this

    ...
    
    import com.rjblopes.opensettings.OpenSettingsPackage; // <-- add this import
    ...
    

Usage


import DeviceSettings from 'react-native-device-settings';

// Open settings menu
DeviceSettings.open();

// Open app settings menu
DeviceSettings.app();

// Open wifi settings menu
DeviceSettings.wifi();

Dev Notes

Developed for personal use and might be useful for others.

Keywords

react-native

FAQs

Package last updated on 29 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts