Skip to content

sneerteam/react-native-sneer

Repository files navigation

React Native Sneer

npm version

A react native android module to talk with the Sneer api.

Setup

  • install module
 npm install react-native-sneer --save
  • android/settings.gradle
...
include ':react-native-sneer'
project(':react-native-sneer').projectDir = new File(settingsDir, '../node_modules/react-native-sneer')
  • android/app/build.gradle
...
dependencies {
    ...
    compile project(':react-native-sneer')
}
  • register module (in MainActivity.java)
...
import me.sneer.react.SneerPackage;      // <-------
...

public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {

 
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ...
    mReactInstanceManager = ReactInstanceManager.builder()
      .setApplication(getApplication())
      ...
      .addPackage(new MainReactPackage())
      .addPackage(new SneerPackage(this))      // <-------
      ...
      .build();

    ...

    setContentView(mReactRootView);
  }

  ...

}

Usage

var Sneer = require('react-native-sneer');
// TODO

About

A react native android module to talk with the Sneer api.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published