12 likes
·
5.1K reads
12 comments
Hello David! thanks for your post. It was very useful. I am not sure if I forgot to implement something, but, when there is no internet connection, the circular progression appears infinitelly on screen... Can you help me?
Hi Ricardo Valins. The Google library is designed to timeout if it fails to connect to its servers, that should give you a response and the loading should finish. This can take quite a few seconds. If that is not the case, you can always implement a timeout mechanism yourself and consider that you have not been able to initialize the library.
Hi, thanks for the post. Is it possible to implement the same, but for the "IDFA explainer" message? Could it also be done with the Flutter package google_mobile_ads? I know that you can use the app_tracking_transparency package to launch the ATT message, but with this you do not use the "IDFA explainer" provided by Google Admob. Thank you
Yes, you do not need to use the app_tracking_transparency plugin, the google_mobile_ads plugin itself already contains the necessary logic to display an informative message. You can create the ATT tracking message from the AdMob interface, in the same section where you create the GDPR message.
David Serrano Thank you very much for the quick answer. I have already created the ATT message in the Admob interface. The problem is that I would like to know how to call that message from Flutter. The function you created "_loadConsentForm()" works to call the "GDPR" form, but what would be the equivalent to call the "IDFA explainer" form?
Unai Ayo You don't have to call the ATT dialog, the google_mobile_ads library takes care of it automatically. The only thing you have to have is the message configured in AdMob. If you already have it, you should see the ATT prompt right after the GDPR dialog.
David Serrano Sorry for continuing with the same thing. But I have done countless tests and the IDFA message still does not appear. I have followed all the steps: Create the IDFA message on the Admob page, enter my app (which is already in release) in this message. Configure info.plist. Bind AppTrackingTransparency in Xcode. I have tried with the code from the official Mobile Ads SDK (Flutter) page, also with that from your page; but nothing works, you only see the GDPR message and then the IDFA message does not appear. I've read that many Flutter developers have the same problem.
Unai Ayo I'm sorry to see that you are still having problems. Please note that this article does not cover the case of the ATT dialog, it is necessary to perform some extra steps in iOS for this. This is the official documentation that I have based it on, if you follow these steps it should work for you: developers.google.com/admob/flutter/eu-con…
David Serrano Thank you very much for your instructions. It would be great if one day you made a tutorial on how to implement both Google Admob messages: GDPR and IDFA in the same code. I think it would be a great help to the Flutter community.
Unai Ayo Thanks for the feedback! I will certainly take it into account if time allows.
In your opening comment you state: "you only need to have the google_mobile_ads plugin installed", but going through the page it appears I need admob_consent_dialog and async_preferences packages as well? Appears also that admob_consent_dialog doesn't exist.
Cliff: For the implementation as such, only google_mobile_ads is needed. Now, to do EXACTLY the same thing I do here, I explain how to do it with async_preferences, but there are other ways.
Regarding the admob_consent_dialog, that is not a dependency, it is the test application that I am creating. Look at:
import 'package:admob_consent_dialog/initialization_helper.dart';
Here, "initialization_helper.dart" is a class that I myself explain how to create in this tutorial.
In short, with what I explain in this tutorial you have everything you need to do the implementation.