如何从ReactNative打开其他应用程序?

时间:2021-11-13 13:03:34

How to open other apps (Gmail, Camera) from ReactNative. How can I pass data from current scene to other app?

如何从ReactNative打开其他应用程序(Gmail,相机)。如何将数据从当前场景传递到其他应用程序?

2 个解决方案

#1


0  

you can mange opening other apps using Linking

您可以使用链接管理其他应用程序

#2


0  

Code sample for opening the dialer

用于打开拨号器的代码示例

const urlToOpen = 'tel:1234567890';
Linking.openURL(urlToOpen);

You can refer to the official doc here, it just predefines some applications, which can be opened.

你可以在这里参考官方文档,它只是预定义了一些可以打开的应用程序。

However, if the question is about to open just about any application, I hope there is no solution till now.

但是,如果问题即将打开任何应用程序,我希望到目前为止还没有解决方案。

#1


0  

you can mange opening other apps using Linking

您可以使用链接管理其他应用程序

#2


0  

Code sample for opening the dialer

用于打开拨号器的代码示例

const urlToOpen = 'tel:1234567890';
Linking.openURL(urlToOpen);

You can refer to the official doc here, it just predefines some applications, which can be opened.

你可以在这里参考官方文档,它只是预定义了一些可以打开的应用程序。

However, if the question is about to open just about any application, I hope there is no solution till now.

但是,如果问题即将打开任何应用程序,我希望到目前为止还没有解决方案。