【问题标题】:Android - Scheme URL - link redirect to appAndroid - 方案 URL - 链接重定向到应用程序
【发布时间】:2016-10-11 22:37:03
【问题描述】:

扫描二维码时我需要打开我的安卓应用。

在二维码中有一个带有打开应用程序的 js 脚本的链接。

在我的 Android 清单中,我添加了 intent,但是当我访问该页面时,浏览器不会加载应用程序。我错过了什么?

安卓:

    <!-- Test for URL scheme -->
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="bbb" android:host="index"/>
    </intent-filter>
    <!-- End Test for URL scheme -->

js(testLink.php)

<script>
   window.location = 'bbb://index';
</script>

【问题讨论】:

标签: javascript php android android-studio url-scheme


【解决方案1】:

尝试将您的window.location 设置为intent://index#Intent;scheme=bbb;end

【讨论】:

  • 当我在android浏览器中加载带有window.location的页面时,它什么也不做,它只是重新加载浏览器页面。该应用程序未打开
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-01-03
  • 1970-01-01
  • 1970-01-01
  • 2015-09-22
  • 1970-01-01
  • 2015-04-09
相关资源
最近更新 更多