1.13.0 • Published 5 years ago

rn-android-nfc-serial-bridge v1.13.0

Weekly downloads
48
License
-
Repository
-
Last release
5 years ago

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

  1. 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
  1. 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')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-android-nfc-comm-bridge')
  3. Copy .so files under src/main/libs to target android

  4. 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

1.13.0

5 years ago

1.12.0

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago