Javascript 单击url提示符“使用应用程序打开Html网页”

Javascript 单击url提示符“使用应用程序打开Html网页”,javascript,html,Javascript,Html,当我在网页上使用带有rtsp的href链接时,当我单击移动浏览器时,它会请求打开应用程序。 我想为http url实现同样的功能,以选择“使用应用打开”。 我如何实现它。您可以在Android应用程序中使用应用程序方案 <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.i

当我在网页上使用带有rtsp的href链接时,当我单击移动浏览器时,它会请求打开应用程序。 我想为http url实现同样的功能,以选择“使用应用打开”。
我如何实现它。

您可以在Android应用程序中使用应用程序方案

<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="app"
        android:host="yourAppName
    </data>
</intent-filter>

android:scheme=“应用程序”
android:host=“yourAppName

然后你可以使用链接app://yourAppName

rtsp是一种以特定方式处理的特定协议。如果您希望链接触发应用程序的打开,而这很可能是在应用程序本身内完成的,并在访问特定域时将其注册到要打开的操作系统。我没有安卓应用程序,这是一个pWA应用程序。你能告诉我如何在网页上实现它吗