我正在编写代码,以便从适用于 android
和 ios
的 React Native 应用程序启动其他应用程序。
使用Linking
形式 react native 我可以重定向到Play Store/App Store
但是
如果已经安装了应用程序,如何启动它?
* 我正在从服务器获取应用程序列表
Linking.openURL('https://play.google.com/store/apps/details?id=com.example.myapp&hl=en')
有什么方法可以启动应用
(如果已安装),否则重定向到相对于平台的App store/play store
?
最佳答案
经过多次搜索,我发现没有深层链接 URL
的 android
的替代方案是使用 native 模块 react-native-intent-launcher使用package-name
启动另一个应用程序。
你可以调用react-native
中的原生函数startActivity
来做一些Intent
的事情,这只能通过android来解决 native 代码
。
正在寻找没有深层链接URL
的iOS
解决方案,如果有任何线索,请在此处更新
一旦我发现我会在这里更新
谢谢
关于ios - 如何从我的应用程序打开其他应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58856557/