Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 743 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 743 Bytes

Android-App-Webview-AdBanner-Template

Basic Template for making a Webview App to view your website, with a Google Ad Banner in the bottom

  • CompileSdkVersion 28
  • Using androidx

Overriding Webview:

  • Pressing back button will return to last page
  • Won't reload page when orientation change

To use this,

In MainActivity.java, change webview.loadUrl("yourLink") and MobileAds.initialize(this, "yourAdUnitId")

In activity_main.xml, change ads:adUnitId="yourAdUnitId"

You still need to make your web page mobile friendly though.

It will look like this (blank part will be your page):
alt text