New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rn-android-nfc-serial-bridge

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-android-nfc-serial-bridge

## Getting started

1.13.0
latest
npm
Version published
Maintainers
1
Created
Source

rn-android-nfc-comm-bridge

Getting started

$ npm install react-native-android-nfc-comm-bridge --save

Mostly automatic installation

$ react-native link react-native-android-nfc-comm-bridge

Manual installation

Android
  • Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNAndroidNfcCommBridgePackage; to the imports at the top of the file
  • Add new RNAndroidNfcCommBridgePackage() to the list returned by the getPackages() method
  • Append the following lines to android/settings.gradle:

    include ':react-native-android-nfc-comm-bridge'
    project(':react-native-android-nfc-comm-bridge').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-android-nfc-comm-bridge/android')
    
  • Insert the following lines inside the dependencies block in android/app/build.gradle:

      compile project(':react-native-android-nfc-comm-bridge')
    
  • Copy .so files under src/main/libs to target android

  • in MainActivity of your project

      import android.view.KeyEvent; // <--- import
      import com.tickclass.reactlibrary.RNAndroidNfcCommBridgeModule;; // <--- import
      public class MainActivity extends ReactActivity {
      ......
       @Override  // <--- Add this method if you want to react to keyUp
      public boolean onKeyUp(int keyCode, KeyEvent event) {
        RNAndroidNfcCommBridgeModule.getInstance().onKeyUpEvent(keyCode, event);
    
        super.onKeyUp(keyCode, event);
        return true;
      }
    

Usage

import RNAndroidNfcCommBridge from 'react-native-android-nfc-comm-bridge';

// TODO: What to do with the module?
RNAndroidNfcCommBridge;

rn-android-nfc-serial-bridge

Keywords

react-native

FAQs

Package last updated on 02 Nov 2019

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