菜鸟教程小白 发表于 2022-12-11 19:38:52

ios - 调用 React Native App 从浏览器接收共享信息


                                            <p><p>如果您使用过 Pinterest,您知道在 Safari 或 Chrome 中,如果您点击分享按钮,pinterest 将显示在分享选项中</p>
<p> <a href="/image/8uCNI.jpg" rel="noreferrer noopener nofollow"><img src="/image/8uCNI.jpg" alt="enter image description here"/></a> </p>
<p>然后,如果您点击 pinterest 图标,该应用程序将以模式弹出,因此您可以选择要保存到的图像和板</p>
<p> <a href="/image/5dneZ.png" rel="noreferrer noopener nofollow"><img src="/image/5dneZ.png" alt="enter image description here"/></a> </p>
<p>我的问题是:我们可以在 React Native 中做到这一点吗?我的意思是我希望我的应用显示在共享选项中并可以从中接收数据。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>虽然我自己还没有实现这一点,但我有兴趣让我的 React-Native 项目既可以接收数据,也可以与其他应用共享数据。下面是一些似乎可以做到这一点的项目和文章的链接:</p>

<h2>从其他应用接收</h2>

<p> <a href="https://github.com/alinz/react-native-share-extension" rel="noreferrer noopener nofollow">https://github.com/alinz/react-native-share-extension</a> </p>

<p> <a href="https://codeburst.io/building-a-mobile-share-extension-for-a-react-native-app-bff4ef91d44f" rel="noreferrer noopener nofollow">https://codeburst.io/building-a-mobile-share-extension-for-a-react-native-app-bff4ef91d44f</a> </p>

<p> <a href="https://github.com/meedan/react-native-share-menu" rel="noreferrer noopener nofollow">https://github.com/meedan/react-native-share-menu</a> <- 将应用添加为接收器(未维护代码,2018 年 5 月)</p>

<h2>分享到其他应用</h2>

<p> <a href="https://facebook.github.io/react-native/docs/share.html" rel="noreferrer noopener nofollow">https://facebook.github.io/react-native/docs/share.html</a> <- 官方向其他应用发送数据的API</p>

<p> <a href="https://github.com/EstebanFuentealba/react-native-share" rel="noreferrer noopener nofollow">https://github.com/EstebanFuentealba/react-native-share</a>
<- 分享社交,向其他应用发送简单数据</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 调用 React Native App 从浏览器接收共享信息,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/43894376/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/43894376/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 调用 React Native App 从浏览器接收共享信息