如何从我的应用程序中打开其他应用程序 [英] How to open other application from my application

查看:257
本文介绍了如何从我的应用程序中打开其他应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写代码以从我的androidios的本机应用程序中启动其他应用程序.

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?

参考: react-native-app-link

推荐答案

经过多次搜索,我发现不带deep link URLandroid的替代方法是使用本机模块

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 URLiOS解决方案(如果有潜在客户,请在此处更新

Looking for iOS solution without deep link URL if any lead please update here

一旦发现我会在这里更新

Once I found I will update Here

谢谢

这篇关于如何从我的应用程序中打开其他应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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