如何在 clash royale pubg COD 等本机应用程序中从设备打开任何随机应用程序?
How to open any random app from device in a react native app like clash royale pubg COD?
我在 React Native 中经历了 Linking.openUrl(),其中可能包含深层链接或路径。它可以用于 whatsaap 和 playstore 之类的应用程序,但是如何才能在 React Native 中打开任何随机应用程序。
我用它从我的 React 本机应用程序打开 clashroyale。
import {
Text,
TouchableOpacity,
Linking
} from 'react-native';
<TouchableOpacity onPress={() => Linking.openURL(`clashroyale://`)}><Text>Open clash royale</Text></TouchableOpacity>
所以基本上您需要找到的只是应用程序的深度 link url。就像这里的 clashroyale 有 clashroyale://
,所以类似地,如果你找到 urls 然后只需将它们添加到 Linkinh.openURL 并且它应该工作。
如果您有任何疑问,希望它helps.Ask。
我在 React Native 中经历了 Linking.openUrl(),其中可能包含深层链接或路径。它可以用于 whatsaap 和 playstore 之类的应用程序,但是如何才能在 React Native 中打开任何随机应用程序。
我用它从我的 React 本机应用程序打开 clashroyale。
import {
Text,
TouchableOpacity,
Linking
} from 'react-native';
<TouchableOpacity onPress={() => Linking.openURL(`clashroyale://`)}><Text>Open clash royale</Text></TouchableOpacity>
所以基本上您需要找到的只是应用程序的深度 link url。就像这里的 clashroyale 有 clashroyale://
,所以类似地,如果你找到 urls 然后只需将它们添加到 Linkinh.openURL 并且它应该工作。
如果您有任何疑问,希望它helps.Ask。