小编Gli*_*nab的帖子

Android 12 中的深度链接只能在生产环境中使用吗?

这个问题实际上有两个部分

从 Android 12 开始,深层链接发生了很大变化。

  1. 域名验证
  2. 用户批准打开应用程序的默认链接

我的第一个问题是这两个都需要实现才能使深层链接发挥作用吗?

其次,在阅读文件时,我发现了这个特殊的注释,其中包含以下内容

不要在清单文件中发布带有公众无法访问的开发/测试 URL 的应用程序(例如只能通过 VPN 访问的任何 URL)。这种情况下的解决方法是配置构建变体,为开发构建生成不同的清单文件。

这是否意味着访问受限的暂存环境不能用于测试?

笔记:

  1. 我已使用确认数字资产链接文件验证了我的数字链接资产,并且它有效
  2. 我的清单看起来像这样
  <activity
          android:name=".view.activity.MemberProfileActivity"
          android:screenOrientation="portrait"
          android:noHistory="true"
          android:windowSoftInputMode="adjustResize|stateHidden">
          <intent-filter android:autoVerify="true">
              <action android:name="android.intent.action.VIEW" />
              <category android:name="android.intent.category.DEFAULT" />
              <category android:name="android.intent.category.BROWSABLE" />

              <data android:scheme="http" />
              <data android:scheme="https" />
              <data
                  android:host="@string/base_domain"
                  android:pathPrefix="/member_profile/" />
          </intent-filter>
      </activity>
Run Code Online (Sandbox Code Playgroud)

任何帮助是极大的赞赏。

android android-manifest android-deep-link android-app-links android-12

6
推荐指数
0
解决办法
1129
查看次数