简体   繁体   English

反应本机深度链接应用程序未打开

[英]React Native Deep Linking Application Not Opening

I followed all the steps from both the articles mentioned below我遵循了下面提到的两篇文章中的所有步骤

https://hackernoon.com/react-native-deep-linking-for-ios-and-android-d33abfba7ef3 https://hackernoon.com/react-native-deep-linking-for-ios-and-android-d33abfba7ef3

https://medium.com/react-native-training/deep-linking-your-react-native-app-d87c39a1ad5e https://medium.com/react-native-training/deep-linking-your-react-native-app-d87c39a1ad5e

After the app gets installed on my phone, I tried opening the app from the browser by giving the URL as peopleapp://people/1 format.在我的手机上安装应用程序后,我尝试通过将 URL 设置为 peopleapp://people/1 格式从浏览器打开应用程序。 Instead of opening the app, the browser opens Google search to search for the above.浏览器没有打开应用程序,而是打开谷歌搜索来搜索上述内容。

I Used this application to open my Application by using my App Link( https://play.google.com/store/apps/details?id=com.manoj.dlt&hl=en_US ) it's working.我使用此应用程序通过我的应用程序链接( https://play.google.com/store/apps/details?id=com.manoj.dlt&hl=en_US )打开我的应用程序,它正在工作。

But how to open the application from browser or from another application Using my App Link?但是如何使用我的应用程序链接从浏览器或其他应用程序打开应用程序?

Anyone has idea, how to solve this issue?任何人都有想法,如何解决这个问题?

Here is my Total AndroidManifest Code`这是我的总 AndroidManifest 代码`

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
    android:name=".MainApplication"
    android:allowBackup="false"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:usesCleartextTraffic="true">
    <activity
        android:name=".MainActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:screenOrientation="portrait"
        android:label="@string/app_name"
        android:windowSoftInputMode="adjustResize"
        android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter android:label="filter_react_native">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="whizzard" android:host="article" />
        </intent-filter>
    </activity>

</application>

` `

My Link is whizzard://article我的链接是 whizzard://article

As per google docs:根据谷歌文档:

The functionality has changed slightly in Chrome for Android, versions 25 and later. Chrome for Android 版本 25 及更高版本中的功能略有更改。 It is no longer possible to launch an Android app by setting an iframe's src attribute.不再可以通过设置 iframe 的 src 属性来启动 Android 应用程序。 For example, navigating an iframe to a URI with a custom scheme such as paulsawesomeapp:// will not work even if the user has the appropriate app installed.例如,即使用户安装了适当的应用程序,将 iframe 导航到具有自定义方案(如 paulsawesomeapp://)的 URI也将不起作用 Instead, you should implement a user gesture to launch the app via a custom scheme, or use the “intent:”.相反,您应该实现用户手势以通过自定义方案启动应用程序,或使用“intent:”。

You can read more about how intents work here .您可以在此处阅读有关意图如何工作的更多信息。 However, the tutorial you followed, for deeplinking will work on other browsers which are not chrome or chrome based .但是,您遵循的深度链接教程将适用非 chrome 或基于 chrome 的其他浏览器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM