Android Question [Solved] Strange behavior of Admob-Consents

D

Deleted member 103

Guest
Hi,

is this different log output normal?
Why is "EU = true" on Android 5.0.1 and "EU = false" on Android 8.0 in debug mode?

B4a-Code:
B4X:
Sub Service_Create
  ...  
  Admob_Consent
End Sub

Private Sub Admob_Consent
    consent.Initialize("consent")
#if debug
    consent.AddTestDevice("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") 'Samsung A5(2017)
#End If
    'True = EU, False = Non-EU
    consent.SetDebugGeography(False) 'comment for regular operation
    consent.RequestInfoUpdate(Array("pub-xxxxxxxxxxxxxxxxx"))
    Wait For consent_InfoUpdated (Success As Boolean)
    If Success = False Then
        Log($"Error getting consent state: ${LastException}"$)
    End If
    Log($"Consent state: ${consent.ConsentState}"$)
    Log("EU: " & consent.IsRequestLocationInEeaOrUnknown)
    Do While IsPaused(Main)
        Sleep(100)
    Loop
    CallSubDelayed(Main, "ConsentStateAvailable")
End Sub

Samsung-S4 (Android 5.0.1):
** Service (starter) Destroy (ignored)**~i:Copying updated assets files (134)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Consent state: UNKNOWN
EU: true
Samsung A5 (Android 8.0):
Copying updated assets files (134)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Consent state: UNKNOWN
EU: false
 
D

Deleted member 103

Guest
consent.SetDebugGeography doesn't do anything unless you set the device id with AddTestDevice. I guess that you set it to the A5 device so it doesn't affect the second device.
Thank you Erel, now I understand.
 
Upvote 0
Top