react-native-network-interfaces-info

1.0.0 • Public • Published

react-native-network-interfaces-info

Getting started

$ npm install react-native-network-interfaces-info --save

Mostly automatic installation

$ react-native link react-native-network-interfaces-info

Manual installation

Android

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

Usage

import RNNetworkInterfacesInfo from 'react-native-network-interfaces-info';
 
// TODO: What to do with the module?
RNNetworkInterfacesInfo;

To getting all of device's network interfaces: RNNetworkInterfacesInfo.getNetworkInterfacesInfo().then((results) => {

}).catch((error) => { console.log(error) })

Install

npm i react-native-network-interfaces-info

DownloadsWeekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

6.47 kB

Total Files

9

Last publish

Collaborators

  • xen0m