Support for AdMob! lazarus / 43-Android ---------------------------------------------------------------------- ADiV · 2018-07-05 06:18 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: Code: Java  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i         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(AdReques t.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. ---------------------------------------------------------------------- jmpessoa · 2018-07-05 14:49 Hi tr3e! Great Work! Congratulations! I will commit your solutions to github! Thank you!!!! ---------------------------------------------------------------------- lainz · 2018-07-05 14:54 Thankyou, this is really good news ---------------------------------------------------------------------- jmpessoa · 2018-07-09 01:07 Hi all! Please, someone can convert "admod.rar" to "admod.zip"  ...    Thanks. ---------------------------------------------------------------------- engkin · 2018-07-09 01:11 Quote from: jmpessoa on July 09, 2018, 03:07:54 am Hi all! Please, someone can convert "admod.rar" to "admod.zip"  ...    Thanks. ---------------------------------------------------------------------- jmpessoa · 2018-07-09 01:16 @engkin, its working! Thank you! ---------------------------------------------------------------------- ADiV · 2018-07-13 16:22 I have created an example of use for AdMob. ---------------------------------------------------------------------- Thaddy · 2018-07-13 16:47 Quote from: tr3e on July 13, 2018, 06:22:57 pmI have created an example of use for AdMob. I'd rather have the opposite: don't bother me with advertising or at least - the basic minimum - no targeted advertising. (Nobody wants that, only marketeers.) Anyway I will find a way to make such code explode. ---------------------------------------------------------------------- ADiV · 2018-07-13 17:07 Quote from: Thaddy on July 13, 2018, 06:47:27 pmQuote from: tr3e on July 13, 2018, 06:22:57 pmI have created an example of use for AdMob. I'd rather have the opposite: don't bother me with advertising or at least - the basic minimum - no targeted advertising. (Nobody wants that, only marketeers.) Anyway I will find a way to make such code explode. You yourself, I simply give you the option. If you want to take it and if not. I do not like publicity either, nor many things of this life. But you have to do everything in life. And if not, look at the bottom of the page and see this advertising. ---------------------------------------------------------------------- jmpessoa · 2018-08-01 21:49 Hi TR3E! the "AppAdMobDemo" is incomplete? ---------------------------------------------------------------------- jmpessoa · 2018-08-05 05:40 Hi,  TR3E! The "jsAdMob"  was added to LAMW git repository! and the demo, too: "AppCompatAdMobDemo1" Thank you! PS. "js" is for "Android Bridges Support" component tab [need "AppCompat" theme!!!] Thank you!!! ---------------------------------------------------------------------- ADiV · 2018-08-09 09:31 Ok thank you, great job. ---------------------------------------------------------------------- Mnggl · 2019-07-02 05:52 Good news ---------------------------------------------------------------------- ketch · 2020-07-12 18:40 Hi, all! @ADiV, @jmpessoa Is it in your plans to add Rewarded ads support for AdMob ? Thanks. ---------------------------------------------------------------------- ADiV · 2021-01-13 12:17 Quote from: ketch on July 12, 2020, 08:40:50 pmHi, all! @ADiV, @jmpessoa Is it in your plans to add Rewarded ads support for AdMob ? Thanks. When jmpessoa uploads the latest update you will have support for Rewarded and Interstational ads. ---------------------------------------------------------------------- jmpessoa · 2021-01-13 16:16 Done!