Android网址覆盖不适用于重定向

xba*_*esx 9 android url-scheme intentfilter android-intent

我有一个我在我的Android应用程序中覆盖的网址.单击从电子邮件到该链接的链接会弹出Intent Chooser对话框("使用完成此操作").但是,点击<a>Chrome中的相同链接(在标记中)(在Android 4上)会将我重定向到该网址,但不会提供该网址Intent Chooser.

如果我使用指向<a>Google Play商店(https://play.google.com)的链接替换代码中的链接,则再次点击该链接会弹出Intent Chooser.

Google Play商店和Chrome是否有特别之处,或者我在配置我的网址时做错了什么?我有什么办法可以用html来完成这项工作吗?

这是 <intent-filter>

<activity
    android:label="@string/app_name"
    android:name="..."
    >
    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
    <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="https"
              android:host="www.example.com"
            />
        <data android:scheme="http"
              android:host="www.example.com"
            />
    </intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)

(重定向到网址也不会弹出Intent Chooser对话框,但我认为上面的情况更明确地表达了我的问题.)

另外值得注意的是,我相当肯定这一切都在我的域名失效时工作.一旦我的域名上线,这就停止了.这可能是我的想象力,因为我当时并不是100%专注于这个问题.

Chrome是否可能会特别对待Google Play商店的网址,否则它会在打开之前等待来自网址的非200响应Intent Chooser

Ale*_*scu 1

很可能是一个真实的/已知的错误。

我建议的一个(但现在已关闭,因此似乎会针对您正在尝试的版本进行修复): https://code.google.com/p/chromium/issues/detail ?id=113140

由@xbakesk发现/打开: https://code.google.com/p/chromium/issues/detail? id=170925 https://code.google.com/p/chromium/issues/detail?id=230104

如果发现任何其他错误,请在评论中告诉我,我将添加或直接编辑我的答案。如果错误被关闭,我也会尝试更新答案。