【问题标题】:App linking not working. How to open app from web browser?应用程序链接不起作用。如何从网络浏览器打开应用程序?
【发布时间】:2018-01-29 03:18:55
【问题描述】:

我已按照 android 文档 Here 中的步骤在我的应用程序中实现链接。我真的不需要任何花哨的参数传递,我想要的只是当用户单击我的应用程序打开的浏览器上的链接时。我所做的只是修改我的 AndroidManifest。这是相关部分

<application
  android:name=".MainApplication"
  android:allowBackup="true"
  android:label="@string/app_name"
  android:icon="@mipmap/ic_launcher"
  android:theme="@style/AppTheme">
  <activity
    android:name=".MainActivity"
    android:label="@string/app_name"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
    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="u2player" android:host="open.my.app" />
    </intent-filter>


  </activity>

我正在使用 react-native-navigation 并尝试从 chrome 浏览器或本机浏览器浏览到 u2player:// u2player://open.my.app u2player://open.my.app/ 中的任何一个都不起作用。我还从 Linking 模块绑定了 url 事件,但没有任何效果。我重新启动,卸载等。

帮助赞赏

【问题讨论】:

    标签: android react-native deep-linking react-native-linking


    【解决方案1】:

    尝试使用branch。它解决了您面临的大部分问题,并且它还有一个非常干净的文档。如果您有任何问题,请通过并让我知道

    【讨论】:

      猜你喜欢
      • 2017-11-06
      • 1970-01-01
      • 2016-01-01
      • 2019-04-05
      • 1970-01-01
      • 2019-07-10
      • 2011-03-20
      • 2013-05-28
      • 1970-01-01
      相关资源
      最近更新 更多