Skip to content

React Native share action for Android with SEND intent

Among an App essential features we can surely mention the "Sharing" ability.
While we got it covered in iOS with react-native-activity-view and react-native-social-share, we still missed an Android counterpart.

Here is Esteban Fuentealba's Component that is also an example implementation of Android's SEND intent.

react-native-share

Share Social, Sending Simple Data to Other Apps

onShare: function() {
  Share.open({
    share_text: "Hola mundo",
    share_URL: "http://google.cl",
    title: "Share Link"
  },function(e) {
    console.log(e);
  });
},
render: function() {
  return (
    <View style={styles.container}>
      <TouchableHighlight onPress={this.onShare}>
        <Text  style={styles.instructions}>
          Share
        </Text>
      </TouchableHighlight>
    </View>
  );
}

Send intent