从 url 打开 Activity 无效 android

Open Activity from url is not working android

你好朋友我想在浏览器中调用特定类型的 url 时打开我的应用程序(预定义格式)

以下是服务器上的溃败

Redirect::to('intent://com.customlymade.activit/#Intent;scheme=customlymade;package=com.customlymade.activity;end');

以下是我在清单文件中使用的意图过滤器

<intent-filter>
    <data
        android:host="com.customlymade.activity"
        android:scheme="customlymade" />

    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.BROWSABLE" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

但是没有任何效果请帮忙。

我猜,重定向是自动执行的。 android 中的 Chrome 具有安全功能,即启动 activity 只能在用户操作(例如单击 link)后完成。请参阅 "See also" 章 https://developer.chrome.com/multidevice/android/intents

And Chrome doesn’t launch an external app for a given Intent URI in the following cases.

  • When the Intent URI is redirected from a typed in URL.
  • When the Intent URI is initiated without user gesture.