Vanar 2 Posted November 24, 2021 Hi all! I'm looking for an implementation of AdMob ads under Delphi 11 on android The implementations for Delphi 10.4 and below (such as https://github.com/ersanyakit/FMX.InterstitialAd.Android, AdMobExtra...) don't work! Share if anyone has!!! Share this post Link to post
okba-dz 1 Posted January 3, 2022 hi There are changes in the Androidapi.JNI.AdMob library So the problem occurred in compatibility I tried to solve the problem but I couldn't find any documentation for Androidapi.JNI.AdMob 1 Share this post Link to post
Dave Nottage 557 Posted January 3, 2022 I've just added a new demo: https://github.com/DelphiWorlds/Playground/tree/main/Demos/Advertising to the Playground repo 6 Share this post Link to post
Lars Fosdal 1792 Posted January 4, 2022 Dave, you are a goldmine 🙂 There appears to be several must do, should do, could do (or do not's) that would help the fledgling developer to get started in a good way, and I bet those were hard earned learning points? I would love to see you author an article (or a book) on the ins and outs of doing an Android app with Delphi! Thank you for all your contributions, and a Happy New Year to you! 4 Share this post Link to post
bilal21dz 1 Posted January 4, 2022 9 hours ago, Dave Nottage said: I've just added a new demo: https://github.com/DelphiWorlds/Playground/tree/main/Demos/Advertising to the Playground repo Thank youuuu 👍 1 Share this post Link to post
Vanar 2 Posted January 4, 2022 11 hours ago, Dave Nottage said: Я только что добавил новую демонстрацию: https://github.com/DelphiWorlds/Playground/tree/main/Demos/Advertising в репо Playground Thank you !!! Please implement TestMode: = False :) 1 Share this post Link to post
Alb 0 Posted February 16, 2022 On 1/3/2022 at 11:05 PM, Dave Nottage said: I've just added a new demo: https://github.com/DelphiWorlds/Playground/tree/main/Demos/Advertising to the Playground repo I'm afraid the URL is shown as not existing anymore (page not found).... Could you, please, place the demo also here? (or anywhere else) Thanks! Share this post Link to post
Dave Nottage 557 Posted February 16, 2022 Just now, Alb said: I'm afraid the URL is shown as not existing anymore (page not found).... Could you, please, place the demo also here? (or anywhere else) Sorry, I renamed it. It's now: https://github.com/DelphiWorlds/Playground/tree/main/Demos/AdMob Please also see: https://github.com/DelphiWorlds/Playground#project-configuration 1 Share this post Link to post
Alb 0 Posted February 16, 2022 1 minute ago, Dave Nottage said: Sorry, I renamed it. It's now: https://github.com/DelphiWorlds/Playground/tree/main/Demos/AdMob Please also see: https://github.com/DelphiWorlds/Playground#project-configuration THANKS VERY MUCH!!!! Share this post Link to post
houssam1984 0 Posted May 16, 2022 didnt work for me can anyone post a tutorial on how to integrate it in my projects??? please !! thank you very much Share this post Link to post
Dave Nottage 557 Posted May 16, 2022 41 minutes ago, houssam1984 said: didnt work for me That's way too vague. Did you try the demo? Bear in mind (and if you read the readme) that it depends on the Kastri library. Share this post Link to post
houssam1984 0 Posted May 26, 2022 is there any detailed tutorial on how to make it fully work??? on 10.4 i just add a unit to my project and call it in uses but on delphi 11 .......... hhhhh it is more complicated i guess Share this post Link to post
Dave Nottage 557 Posted May 26, 2022 21 minutes ago, houssam1984 said: is there any detailed tutorial on how to make it fully work??? Did you read the details of the readme, here? https://github.com/DelphiWorlds/Playground/tree/main/Demos/AdMob#readme Share this post Link to post
houssam1984 0 Posted July 2, 2022 On 5/26/2022 at 10:16 PM, Dave Nottage said: Did you read the details of the readme, here? https://github.com/DelphiWorlds/Playground/tree/main/Demos/AdMob#readme [dcc32 Fatal Error] DW.AdMobBannerAd.pas(14): F1026 File not found: 'DW.GlobalDefines.inc' Share this post Link to post
Dave Nottage 557 Posted July 2, 2022 1 hour ago, houssam1984 said: [dcc32 Fatal Error] DW.AdMobBannerAd.pas(14): F1026 File not found: 'DW.GlobalDefines.inc' The AdMob demo (as well as others in the Playground repo) is dependent on the Kastri library: https://github.com/DelphiWorlds/Kastri Please see the Project Configuration section, here: https://github.com/DelphiWorlds/Playground/blob/main/Readme.md Share this post Link to post
sevalx@gmail.com 0 Posted May 27 Hi. I'm using Delphi 12. I connected Kastri-master and am testing admob. In Object inspector in AdmobBanerAd1.AdUnitID I connected my data ca-app-pub-328..... After compilation an error is thrown. what am I doing wrong? Share this post Link to post
Dave Nottage 557 Posted May 27 5 minutes ago, sevalx@gmail.com said: what am I doing wrong? It's literally telling you what the problem is, i.e. you need to include meta-data in the manifest. Please see this section of the readme. Share this post Link to post
sevalx@gmail.com 0 Posted May 28 (edited) 23 hours ago, Dave Nottage said: It's literally telling you what the problem is, i.e. you need to include meta-data in the manifest. Please see this section of the readme. I also changed the data in the manifest... I just didn’t attach the file earlier. the error persists. Edited May 28 by sevalx@gmail.com Share this post Link to post
Dave Nottage 557 Posted May 28 9 minutes ago, sevalx@gmail.com said: I also changed the data in the manifest... I just didn’t attach the file earlier. the error persists. Looking at your screenshot, you have the meta-data inside of a service tag, rather than inside the application tag, as per the readme that I linked to. Share this post Link to post
sevalx@gmail.com 0 Posted May 28 11 minutes ago, Dave Nottage said: Looking at your screenshot, you have the meta-data inside of a service tag, rather than inside the application tag, as per the readme that I linked to. Thank you for noticing my inattention. The first error is gone. Now there is an error Consent error from : ConsentInfoUpdate-3 Publisher misconfiguration:Malformed request; the requested app ID is likely malformed, please fix it and try again. In the test application where can this be changed? to manage the request. Or does it all change only on the admob website? Share this post Link to post
Dave Nottage 557 Posted May 28 6 minutes ago, sevalx@gmail.com said: ConsentInfoUpdate-3 Publisher misconfiguration:Malformed request; the requested app ID is likely malformed, please fix it and try again I just noticed in your screenshot that you also had the name attribute of the meta-data incorrect, however given that the first error has gone, I assume you've corrected that? It should look like this: <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-1692413347180528~0000000000"/> i.e. the name attribute should be: com.google.android.gms.ads.APPLICATION_ID If it is now correct, the next error message suggests that the value (in the value attribute of the meta-data) you are supplying is incorrect. You should also pay attention to the details in the User Messaging Platform section of the readme. Share this post Link to post
sevalx@gmail.com 0 Posted May 29 On 5/28/2024 at 7:43 AM, Dave Nottage said: If it is now correct, the next error message suggests that the value (in the value attribute of the meta-data) you are supplying is incorrect. You should also pay attention to the details in the User Messaging Platform section of the readme. Will the values of the two parameters be the same? <meta-data android:value and AdMobBannerAd1.AdUnitAd But how to use different advertisements if they have different identifiers? The reward banner has one ID and the interstitial ad has a different ID. Using the adm component we specify the application ID. The error above was due to an incorrectly specified ~ prefix in the parameter. But now there's a new mistake Consent error from: ConsentInfoUpdate - 3: Publisher misconfiguration: Failed to read publisher's account configuration; no form(s) configured for the input app ID. Verify that you have configured one or more forms for this application and try again. Received app ID: `ca-app-pub-3285XXXXXX~XXXXX" Share this post Link to post
Dave Nottage 557 Posted May 29 2 hours ago, sevalx@gmail.com said: Will the values of the two parameters be the same? <meta-data android:value and AdMobBannerAd1.AdUnitAd No, since one is an application id, and the other is an ad unit id. 2 hours ago, sevalx@gmail.com said: But how to use different advertisements if they have different identifiers? The reward banner has one ID and the interstitial ad has a different ID. By setting the AdUnitId property of those you have ids for. You set these up in the AdMob web interface 2 hours ago, sevalx@gmail.com said: Failed to read publisher's account configuration; no form(s) configured for the input app ID .The most likely cause is that you need to configure GDPR and IDFA messages, here. Share this post Link to post