This should be fixed, ty for pointing out
Hey @Scott_Harrison Iāve noted that the documentation include the new functions outside from the Admob initialization. Should I include this calls inside the āinitā phase of Admob?
Look at this example:
local
function
adListener( event )
if
(event.phase ==
"loaded"
and
event.
type
==
"ump"
)
then
admob.showConsentForm()
end
end
admob.init( adListener, { appId=
"YOUR_ADMOB_APP_ID"
} )
local
formStatus, consentStatus = admob.getConsentFormStatus()
if
(formStatus ==
"available"
)
then
-- recommend (not required)
admob.loadConsentForm()
end
Thank you for the quick action on this.
Two questions -
-
In the Admob dashboard, it has an option to create a GDPR message. Do we need to do this ourselves (any tips on what to write??), or will Admob provide an acceptable default message?
-
How do we test this consent form on our app after we implement it, especially if weāre not in Europe? (I guess I could set my VPN to Europe?)
Admob has their own UMP to create the message. It is very easy to created it, so you donāt have to write anything, just follow the stepsā¦
- There is a debug option
The consent form is not dependent on init event or admob.init() (other then the listener)
So itās really your preference
Great, thank you!
Has anyone gotten this to work yet?
When I run:
local
formStatus, consentStatus = admob.getConsentFormStatus()
I get:
Form Status: unavailable Consent Status: unknown
Iām also getting the error:
ERROR: admob.updateConsentForm( [options] ), Invalid option 'underage'
On my AdMob dashboard under Privacy & messaging the GDPR message is āOnā, the status is āPublishedā and the app Iām testing it with is selected. Iām about four hours into debugging this and Iām out of ideas.
I am also having trouble getting this to work.
admob.getConsentFormStatus() returns a formStatus of āunknownā and consentStatus of āunknownā for me.
In admob my message is āonā and the status is āpublishedā as well.
Iām not sure if this has anything to do with it, but my app is currently in development and is not listed in the app store yet, therefore my app in admob has a status of ārequires reviewā.
Hello.
I am having the same problem.
The admob.getConsentFormStatus function returns formStatus as āunavailableā and contentStatus as āunknownā.
In the admob dashboard, the message is āonā and the status is also āpublishedā.
By the way, if you call the admob.getConsentFormStatus function immediately after the admob.init function as per the documentation, it returns the following error.
ERROR: admob.getConsentFormStatus( ), You must wait for the āinitā event before calling other API functions
So I solved this by calling the getConsentFormStatus function from within adListener.
Hey @silent12o Iām glad youāve tested it. @Scott_Harrison says that those functions are independent from the āinitā phase but I suspected that canāt be that way, so I implemented admob.getConsentFormStatus
in the init phase.
Hey yeah, sorry I misspoke, I just remembered you do need to after init phase because of the way the init checking is done. Will update doc samples to reflect this
I donāt think thatās the main problem though. I was doing everything related to the UMP well after init
and getting unavailable
and unknown
.
I still havenāt gotten this to work yet, but I have made progress on ios.
Originally I was receiving a formStatus of āunknownā and consentStatus of āunknownā.
My app is still in development, so I never setup my payment profile in AdMob. I didnāt think this would prevent me from testing as I could still setup an App and message in AdMob. Yesterday I supplied the remaining profile information that AdMob was requesting. Now it appears I can utilize the UMP APIs.
On ios I now get a formStatus of āavailableā and a consentStatus of ārequiredā. I am able to successfully invoke the admob.loadConsentForm() to load the form (I can tell it is successful based on the event). However, I have not been able to display the form. When I invoke admob.showConsentForm() nothing happens. My event listener does not get triggered.
Unfortunately, on Android I am getting a formStatus of āunavailableā and consentStatus of āunknownā.
@Scott_Harrison I pulled the AdMob repo to help me triage why the consent form isnāt showing for me on ios.
In the AdMobPlugin::showConsentForm(lua_State *L) method I noticed that this condition fails because adInstance is blank.
// show form
CoronaAdMobAdInstance *adInstance = admobObjects[@"ump"];
if(adInstance && adInstance.isLoaded == true)
In the āAdMobPlugin::loadConsentForm(lua_State *L)ā method I added this code which seemed to resolve the issue.
admobObjects[@"ump"] = adInstance;
I havenāt triaged the issue I am having for Android yet.
@Scott_Harrison thanks for updating the iOS implementation. Iām able to display the consent form now.
I think I see an issue with the Android implementation. In the updateConsentForm method it looks like it always returns 0 since it checks that the key is equal to āunderageā and ādebugā.
I think we just need to replace this
} else {
logMsg(ERROR_MSG, "Invalid option '" + key + "'");
return 0;
}
if (key.equals("debug")) {
with
} else if (key.equals("debug")) {
Admob updated the message on the console. Now it says "Beginning January 16, 2024, Google will require "ā¦
yes they have pushed it back based on publisher feedback. gives us some more time to transition!
Is this working for Google Play now? Was the suggestion by @Sandhive valid and if so implemented @Scott_Harrison?