当前位置: 首页 > 知识库问答 >
问题:

Android应用程序链接不起作用,是因为注释吗?

樊宏邈
2023-03-14
<intent-filter android:autoVerify="true">
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.category.DEFAULT" />
            <action android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="http" android:host="real.host.here" />
            <data android:scheme="https" android:host="real.host.here" />
</intent-filter>
<activity
    android:name=".activities.MainActivity_" ...>
    <intent-filter...>...</intent-filter>
</activity>

由于AndroidAnnotations,名称是“.mainActivity_”,而不是“mainActivity”。

除此之外,托管的AssetLinks.json可以通过HTTPS连接访问,下面是我的文件:

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.my.package.name",
    "sha256_cert_fingerprints":["32:D9:9E:17:2E:C7:B4:82:12:96:C8:3E:D1:51:56:3F:7C:ED:97:69:F9:4A:39:54:4C:7B:AD:8A:AD:27:8F:45"]
  }
}]

SHA256指纹来自我用来构建应用程序发布版本的证书。

https://digitalassetlinks.googleapis.com/v1/statements:list?
source.web.site=https://<domain1>:<port>&
relation=delegate_permission/common.handle_all_urls
... "debugString": "********************* ERRORS *********************\nNone!\ ...
adb shell am start -a android.intent.action.VIEW \
-c android.intent.category.BROWSABLE \
-d "http://<domain1>:<port>"

共有1个答案

单于耘豪
2023-03-14

我发现了自己的问题。

首先我发现在意图过滤器中,

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

应该是

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="real.host.here" />
<data android:scheme="https" android:host="real.host.here" />
 类似资料:
  • 演示网站:http://recipe-app.com/recipe/grilled-potato-salad演示应用:http://search-codelabs.appspot.com/codelabs/android-deep-linking 我的测试: 我已经从上面的链接安装了演示应用程序。我用谷歌搜索应用程序搜索了“烤土豆沙拉”,结果发现http://recipe-app.com/reci

  • 我有一个简单的类叫BeaconDao 然而,当我用@service或@component标记beaconDao时,一切都运行得非常好。有人能看出问题所在吗?

  • 问题内容: 我正在尝试使用Java批注,但似乎无法使我的代码认识到其中存在。我究竟做错了什么? 问题答案: 您需要使用注释界面上的@Retention注释将注释指定为运行时注释。 即

  • 同事们,我的测试类中有@Ignore注释 我的pom看起来: 结果我收到: [信息]正在扫描项目...[INFO][INFO]-----------------------------------------------------------------------------------------------------------------------------------------

  • 我使用的是来自web应用程序的Spring数据JPA。我的目标是工作API、REST crud方法,使用MySQL中的两个表。项目是目标,那么DB有两个表:Item和AutoBrand,它们是关联关系。一件商品可以得到比一件更多的汽车品牌。但我的应用程序得到的问题,自动品牌表不是从项目表找到id。 项目代表java AutoBrand Rep.Java