反应本机共享文件或链接 [英] React Native Share file or link

查看:57
本文介绍了反应本机共享文件或链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不知道这叫什么,但是在Android上,一个应用程序可以打开此窗口,并且如果我选择说Gmail,它将自动在Gmail中创建文件附件.

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.

如何在带有Expo的React Native中实现这一目标(不分离)?

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

推荐答案

您正在寻找类似 react-native-share .

由于您正在使用Expo,因此您可能要使用链接(打开指向其他应用程序的链接),该链接指示您使用 react-native-app-link .或者,对于Android方面更复杂的内容, IntentLauncherAndroid 加上一些自定义代码也可以.

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.

帮助您查找更多信息的关键字是共享链接深层链接,如果您了解Android开发,请意图.

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

这篇关于反应本机共享文件或链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆