admob.loadConsentForm()

Type Function
Return value none
Revision Release 2024.3703
Keywords ads, advertising, AdMob, hide
See also admob.showConsentForm()
admob.*

Overview

This function loads Consent Form to be displayed (if needed)

Syntax

admob.loadConsentForm()

Example

local admob = require( "plugin.admob" )


-- Initialize the AdMob plugin
local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        local formStatus, consentStatus = admob.getConsentFormStatus()

        if(formStatus == "available")then -- recommend (not required)
            admob.loadConsentForm()
        end
    end

end
admob.init( adListener, { appId="YOUR_ADMOB_APP_ID" } )