Hi guys, I've managed to support AdMob on LAMW. This mode:
First we need download: gradle 4.1
https://gradle.org/next-steps/?version=4.1&format=bin and install.
Second, we need to create a appCompat gradle project, and set the path of Gradle [LAMW] Android Module Wizard -> Paths Settings
Three, install the SDK components for AdMob:
Android Support Repository - Google Play services - Google Repository
Fourth, add "compile 'com.google.android.gms: play-services-ads: 11.0.4'" to the project file "buidl.gradle"
Fifth, add the following code in the "Controls.java" file in the "jForm" class in the constructor:
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.AdSize;
// ..... constructor
String banner_id
= "ca-app-pub-3940256099942544/6300978111";
MobileAds.initialize(controls.activity, banner_id);
LayoutParams bannerLParams = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
bannerLParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
bannerLParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
AdView adView=new AdView(controls.activity);
adView.setLayoutParams(bannerLParams);
adView.setAdSize(AdSize.BANNER);
adView.setAdUnitId(banner_id);
layout.addView(adView);
//AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build();
AdRequest adRequest = new AdRequest.Builder().build();
// Start loading the ad in the background.
adView.loadAd(adRequest);
Attached AdMob component and modifications in the latest version of LAMW.