react-native-blip

1.0.0 • Public • Published

react-native-blip

A module for detecting Blip points and communicating with the Blip API.

Add module

$ yarn add react-native-blip

or

$ npm install react-native-blip --save

Installation

$ react-native link react-native-blip

For manual installation, see below.

Usage

Import native module

const { Blip } = NativeModules;

Listen for events

blipEmitter = new NativeEventEmitter(Blip);
 
blipEmitter.addListener(
    "Blip.didDetect",
    e => { /*Handle event*/ }
);
 
blipEmitter.addListener(
    "Blip.didInvalidateWithError",
    e => { /*Handle event*/ }
);
 
blipEmitter.addListener(
    "Blip.notSupported",
    e => { /*Handle event*/ }
);

Detecting Blip points

Blip.begin(); // Start listening
Blip.invalidate(); // Stop listening

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-blip and add RNBlip.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNBlip.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 io.ifdef.blip.sdk.RNBlipPackage; to the imports at the top of the file
  • Add new RNBlipPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-blip'
    project(':react-native-blip').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-blip/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-blip')
    

Readme

Keywords

Package Sidebar

Install

npm i react-native-blip

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

85.4 kB

Total Files

32

Last publish

Collaborators

  • ifdef-dev