【问题标题】:How to open Trusted web activity from our Activity by sending URL如何通过发送 URL 从我们的活动中打开受信任的网络活动
【发布时间】:2019-09-18 17:19:35
【问题描述】:

在文档中,我们可以从清单中将 URL 设置为受信任的网络活动。但是如何通过将 URL 发送到受信任的网络活动来从我们的活动中打开呢?

  1. 我们可以在受信任的网络活动中操纵点击事件吗?

【问题讨论】:

  • 嗨。如果我理解正确,您有一个现有的本机 Activity 并希望从中启动 TWA。对吗?

标签: android progressive-web-apps trusted-web-activity


【解决方案1】:

“如何通过向受信任的网络活动发送 URL 从我们的活动中打开”:对于仍在寻找答案的人 - 请在此处查看我的帖子:https://stackoverflow.com/a/58069713/8818281

简而言之:

Intent intent = new Intent(this, com.google.androidbrowserhelper.trusted.LauncherActivity.class);
intent.setData(Uri.parse("ANOTHER_SITE_URL"));
startActivity(intent);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-31
    相关资源
    最近更新 更多