A react native android module to talk with the Sneer api.
- 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);
}
...
}
var Sneer = require('react-native-sneer');
// TODO