如何从我的应用程序中打开其他应用程序 [英] How to open other application from my application
问题描述
我正在编写代码以从我的android
和ios
的本机应用程序中启动其他应用程序.
I am writing code to launch other applications from my react native application for android
and ios
.
使用Linking
表单本机反应我可以重定向到Play Store/App Store
,但是
Using Linking
form react native I am able to redirect to Play Store/App Store
but
如果已经安装了应用程序,该如何启动?
*我正在从服务器获取应用程序列表
Linking.openURL('https://play.google.com/store/apps/details?id=com.example.myapp&hl=en')
如果安装了app
,是否可以以其他方式启动app
,或者相对于平台重定向到App store/play store
?
Is there any way that I can launch the app
if it's installed else redirect to App store/play store
with respect to the platform?
推荐答案
经过多次搜索,我发现不带deep link URL
的android
的替代方法是使用本机模块
After many searches I have found an alternative for android
without deep link URL
is to use the native module react-native-intent-launcher to launch another app using package-name
.
您可以在react-native
中调用本机函数startActivity
以使用Intent
做某事,而这只能通过android native code
解决.
You can call the native function startActivity
in react-native
to do something with Intent
which can only be solved with android native code
.
寻找没有deep link URL
的iOS
解决方案(如果有潜在客户,请在此处更新
Looking for iOS
solution without deep link URL
if any lead please update here
一旦发现我会在这里更新
Once I found I will update Here
谢谢
这篇关于如何从我的应用程序中打开其他应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!