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

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

问题描述

不知道这叫什么,但在 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.

如何在 React Native 中使用 Expo(无需分离)实现这一点?

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.

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

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