Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I invoke Admob.requestTrackingAuthorization() #280

Open
mnc12004 opened this issue May 14, 2021 · 1 comment
Open

How do I invoke Admob.requestTrackingAuthorization() #280

mnc12004 opened this issue May 14, 2021 · 1 comment

Comments

@mnc12004
Copy link

HI,
I guess this is not particularly an issue with the package, but I can't find the answer anywhere.

I am trying to invoke Admob.requestTrackingAuthorization() to satisfy Apples approval process and I have tried a few different approaches.

I wrapped in a function and call the function within the Builder widget:
static Future checkPermissions() async { if (Platform.isIOS) { // Run this before displaying any ad. print('IOS Detected'); await Admob.requestTrackingAuthorization(); // return Admob.requestTrackingAuthorization(); //this didn't work either } else if (Platform.isAndroid) { print('Android Operating System Detected'); } }

I'm getting the print object but not getting a dialog on iOS.

I have tried this in main.dart, home_page.dart and now have it checked before any ad loads.

I'm not sure if Apple will accept the build if I just remove the tracking key and information...

Any help is greatly appreciated.

@j-j-gajjar
Copy link

any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants