英文:
Android Deep link- Supported web addresses
问题
我已经在Android中实现了深度链接,带有支持的网址,但是,
在应用程序中,默认情况下未启用,我不知道原因,我应该去应用程序设置中手动启用它,以便像这样开始工作:
我的问题是如何在安装应用程序时默认启用它?
我的清单:
<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="winwinapp.net" />
</intent-filter>
英文:
I've implemented an Android deep link with a support web address but,
It's not enabled by default in the app and I don't know the reason, I should go to the app setting and enable it manually to start working as shown here:
My question is how to enable it by default when installing the app?
My Manifest:
<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="winwinapp.net" />
</intent-filter>
答案1
得分: 3
这将仅在域名正确配置的情况下默认启用。文档在此处:https://developer.android.com/training/app-links/verify-android-applinks。
总结:
- 将
https://winwinapp.net/.well-known/assetlinks.json
上传到您的服务器。(文档中提供了示例格式) - 向您的应用程序添加 scheme。
- 确保将
android:autoVerify="true"
设置为您的链接。
这样做是为了防止应用程序劫持深度链接。例如,防止恶意开发人员将 facebook.com
注册到他们的应用程序而不是官方应用程序。
英文:
This will only be enabled by default if the domain is configured properly. Documentation here: https://developer.android.com/training/app-links/verify-android-applinks.
Summary:
- Upload
https://winwinapp.net/.well-known/assetlinks.json
to your server. (Example format in the documentation) - Add scheme to your app
- Make sure you set
android:autoVerify="true"
to your link.
This is done to prevent apps from hijacking deeplinks. For example, to prevent a malicious developer from registering facebook.com
to go to their app instead of the official one.
答案2
得分: 1
确保您的应用程序处于发布变体版本中。此外,请确保将assetlinks.json文件发送到正确的地址。
android:autoVerify="true"
将自动提供选择。
英文:
Make sure your app is in the release variant-version. Additionally, make sure that the assetlinks.json file is sent to the correct address.
android:autoVerify="true"
will automatically provide selection.
答案3
得分: -1
确保在开发中向Firebase添加SHA1
。另外,请确保在生产中从Play控制台向Firebase添加SHA1
。
英文:
Make sure add SHA1
to firebase for development. Other thing, make sure add SHA1
from play console to Firebase for production.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论