【问题标题】:integrate admob into android twa app generated using bubblewrap将 admob 集成到使用 bubblewrap 生成的 android twa 应用程序中
【发布时间】:2021-02-01 07:32:32
【问题描述】:

按照下面的 google codelabs 教程,我正在尝试将 admob 代码添加到由 bubblewrap 生成的 android 项目源/应用程序中。

在第 3 步,按照说明,它正在添加 framelayout 以向 mainactivity.xml 显示横幅广告。但是我在项目中没有找到这个 xml 文件。哪个文件/位置适合在bubblewrap 生成的应用中添加此横幅广告?

【问题讨论】:

    标签: android admob progressive-web-apps twa bubblewrap


    【解决方案1】:

    您不能将 Android 原生元素与 Trusted Web Activity 混合使用。

    Trusted Web Activity (TWA) 只是 Chrome for Android 浏览器的一种特殊状态,类似于 Custom Tabs。 TWA 占据全屏。

    请参阅:Taking Chrome Full Screen with Trusted Web Activities (Google I/O ’19)。如视频中所述,you can't draw the example native toolbar at the bottom of the screen with a TWA 和 AdMob for Android 使用原生移动视图。

    因此,像 AdMob 的横幅视图这样的原生移动视图是不可能的。

    【讨论】:

    • 有 AdMob 的替代品吗?有没有办法通过广告通过 TWA 应用获利?
    猜你喜欢
    • 2022-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-10
    • 2011-06-29
    • 1970-01-01
    • 2017-12-25
    • 1970-01-01
    相关资源
    最近更新 更多