0

Following the below google codelabs tutorial, i am trying to add admob code into the android project source/app generated by bubblewrap.

on step 3, as per instruction, it is adding framelayout to show bannerad to mainactivity.xml. However i am not finding this xml file in the project. Which file/place is the right to add this banner ad within the app generated by bubblewrap?

jkr
  • 630
  • 1
  • 11
  • 24

1 Answers1

1

You can't mix Android native elements with Trusted Web Activity.

A Trusted Web Activity (TWA) is just a special state of the Chrome for Android browser similar to Custom Tabs. The TWA takes up the full screen.

See: Taking Chrome Full Screen with Trusted Web Activities (Google I/O ’19). As mentioned in the video, you can't draw the example native toolbar at the bottom of the screen with a TWA, and AdMob for Android uses native mobile views.

So native mobile views like AdMob's banner view isn't possible.

Morrison Chang
  • 11,691
  • 3
  • 41
  • 77