flet icon indicating copy to clipboard operation
flet copied to clipboard

Google Ads integration is not working.

Open alejandropoos opened this issue 1 year ago • 2 comments

Duplicate Check

  • [X] I have searched the opened issues and there are no duplicates

Describe the bug

When I try to use any of the Ads controls (BannerAd or InterstitialAd) they don't work on Android (real, simulator or with the --android flag). Half of the screen appears in red with the message "Unknow control: interstitial_id". I have tried: -The examples in the official documentation as proposed. -Customizing the code according to my needs and context. -Direct call to the InterstitialAd/BannerAd control -Not using the id_interstitial variable, but instead putting the string directly into the "unit_id" property. All of this leads to the same result, none of this works for me. As I mentioned before, I have tried different options, contexts and devices but nothing works. I attach the error screen.

Tested Flutter versions: 3.24.5 and 3.27.0 (The latter does not package directly due to the CardTheme problem)

Code sample

Code
[Paste your code here]

To reproduce

Any use of ads (InterstitialAd or BannerAd)

Expected behavior

Red half screen with message "Unknown control: interstitial id".

Screenshots / Videos

Captures ![WhatsApp Image 2025-01-13 at 13 43 52](https://github.com/user-attachments/assets/baae228d-6491-479f-9783-02bd6ce50948)

Operating System

Windows

Operating system details

Windows 11

Flet version

0.25.2

Regression

No, it isn't

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

It does not show in console with the --android flag. If it is packaged in .apk it does not open the application.

alejandropoos avatar Jan 13 '25 18:01 alejandropoos

WhatsApp Image 2025-01-13 at 13 43 52

alejandropoos avatar Jan 13 '25 18:01 alejandropoos

Should be working properly in the latest versions: https://docs.flet.dev/ads/#ios

Give it a try and let know if you still face issues.

ndonkoHenri avatar Mar 31 '26 10:03 ndonkoHenri