I have tried the code but Wait For ump_Update (Success As Boolean) does not really waiting for a result whatever it is (consent or no-consent) and immediately logs both false.
success: false
canRequestAds: false
UPDATE
If you use ump.UpdateAndRequestIfNeededNative(pgMain,Null) then it is waiting for a result
UPDATE 2
If you want to show IDFA message after UMP dialog then does not wait again
Private Sub CheckIdfa
ump.UpdateAndRequestIfNeededNative(pgMain,Null)
Wait For ump_Update (Success As Boolean)
Log("success: " & Success)
Log("canRequestAds: " & ump.CanRequestAds)
Dim no As NativeObject = Me
no.RunMethod("requestIDFA", Null)
Wait For GAD_TrackingAuthorization (Status As Int)
Log("IDFA status code:" & Status)
End Sub
According to
this Mobile Ads advisor, firstly we have to show UMP dialog and then IDFA, that is why i am asking
UPDATE 3
After spending my morning searching, putting this fixes the issue:
Private Sub CheckIdfa
ump.UpdateAndRequestIfNeededNative(pgMain,Null)
Wait For ump_Update (Success As Boolean)
Log("success: " & Success)
Log("canRequestAds: " & ump.CanRequestAds)
Sleep(0)
Dim no As NativeObject = Me
no.RunMethod("requestIDFA", Null)
Wait For GAD_TrackingAuthorization (Status As Int)
Log("IDFA status code:" & Status)
End Sub
UPDATE 4
It only worked once and now it does not. It drives me crazy. I need assistance