mohsen.arian
Member
Hi everyone,
I’m using the AdsHelper class to display the GDPR consent form. However, I have a problem: the form is being shown for all IPs.
I want the form to be displayed only when the user is coming from European IPs.
What should I do to implement this condition?
I disabled this line of code, but it still shows up for all IPs.
I’m using the AdsHelper class to display the GDPR consent form. However, I have a problem: the form is being shown for all IPs.
I want the form to be displayed only when the user is coming from European IPs.
What should I do to implement this condition?
I disabled this line of code, but it still shows up for all IPs.
B4X:
m.SetConfiguration(m.CreateRequestConfigurationBuilder(Array("8A2BC683096DA70A5AB35C9F69DA8B52")))
Ads.ResetConsentStatus
Public Sub SetConsentDebugParameters (TestId As String, InEEA As Boolean)
Log("Consent debug parameters are being set. Don't forget to remove before production.")
ConsentDebugSettings.InitializeNewInstance("com.google.android.ump.ConsentDebugSettings$Builder", Array(ctxt))
Dim geo As Int
If InEEA Then geo = 1 Else geo = 2
ConsentDebugSettings.RunMethod("setDebugGeography", Array(geo))
ConsentDebugSettings.RunMethod("addTestDeviceHashedId", Array(TestId))
ConsentDebugSettings = ConsentDebugSettings.RunMethod("build", Null)
End Sub
If ConsentDebugSettings.IsInitialized Then
ConsentRequestParameters.RunMethod("setConsentDebugSettings", Array(ConsentDebugSettings))
End If