Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Share file or link

Not sure what this is called, but on Android an app is able to bring up this window, and if I select, say Gmail, it will automatically create a file attachment in Gmail.

How can I achieve this in React Native with Expo (without detaching)?

like image 215
Avery235 Avatar asked Apr 13 '18 14:04

Avery235


1 Answers

You are looking for something like react-native-share.

Since you're using Expo, you'll probably want to use Linking (Opening links to other apps) which points you to using react-native-app-link. Or for something more complicated on the Android side, the IntentLauncherAndroid with some custom code could work as well.

Keywords to help you look for more information are sharing, linking, deep linking, and if you know Android development, Intents.

like image 73
Michael Cheng Avatar answered Oct 01 '22 21:10

Michael Cheng