如何使用React Native Share API共享应用程序链接?

问题描述 投票:1回答:1

我正在尝试通过app中的app设置与他人共享react native安装链接。

我为此使用了react native份额api

但是使用下面的代码,输出仅显示消息(下面的代码和屏幕截图。)>

const shareAppOptions = {
  title: 'App link',
  message: 'Please install this app and stay safe', 
  url: 'https://play.google.com/store/apps/details?id=nic.goi.aarogyasetu&hl=en'
};

enter image description here

是什么问题?,我到处搜索,没有一个合适的例子。

我正在尝试以React Native将我的应用程序安装链接从我的应用程序设置共享给其他人。我为此使用了react native share api。但是使用下面的代码,输出仅显示消息(...

android ios react-native share hybrid-mobile-app
1个回答
0
投票

问题是在Android中,您无法将某些内容指定为url,但是在IOS中进行操作时,您将获得链接(请检查文档以交叉验证:rn-share。最好发送应用程序的链接消息本身,以便两个平台都可以在不编写双重代码的情况下获得消息。

© www.soinside.com 2019 - 2024. All rights reserved.