react-native-android-share
This fires off the default android share tray:
Installl
npm i react-native-android-share --save
Add it to your android project
- In
android/setting.gradle
...include ':RNAndroidShare', ':app'project(':RNAndroidShare').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-share')
- In
android/app/build.gradle
...dependencies { ... compile project(':RNAndroidShare')}
- Register Module in your MainActivity.java
// <--- import
- Now implement into your code
var React = var View Text TouchableHighlight Image = Reactvar AndroidShare = ; var ShareButton = React; moduleexports = ShareButton;
TODO
- right now, module basically returns an empty view. need to either make this a component OR just a file with classes in it.
CONTACT
thayden@gmail.com with questions or pull requests