Android - Scheme URL -链接重定向到应用程序



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

在QR码中有一个链接与js脚本打开应用程序。

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

Android:

    <!-- 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>

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

相关内容

最新更新