AppLovin / AppLovin-MAX-SDK-Android

Other
210 stars 95 forks source link

setDebugUserGeography to GDPR not working #607

Closed anh-lt closed 5 months ago

anh-lt commented 6 months ago

MAX SDK Version

12.1.0

Device/Platform Info

Android 11

Current Behavior

I am not located in the EU and trying to check the consent-flow for users inside the GDPR region. I'm using this code:

AppLovinSdkSettings settings = new AppLovinSdkSettings(this);
...
settings.getTermsAndPrivacyPolicyFlowSettings().setDebugUserGeography(AppLovinSdkConfiguration.ConsentFlowUserGeography.GDPR);

and my app does not show the Google consent dialog.

Expected Behavior

setDebugUserGeography to GDPR should make the app shows the Google consent dialog

How to Reproduce

AppLovinSdkSettings settings = new AppLovinSdkSettings(this);
settings.getTermsAndPrivacyPolicyFlowSettings().setEnabled(true);
settings.getTermsAndPrivacyPolicyFlowSettings().setPrivacyPolicyUri(
                Uri.parse("my_policy"));
   settings.getTermsAndPrivacyPolicyFlowSettings().setDebugUserGeography(AppLovinSdkConfiguration.ConsentFlowUserGeography.GDPR);

AppLovinSdk sdk = AppLovinSdk.getInstance(settings, this);

sdk.setMediationProvider(AppLovinMediationProvider.MAX);
sdk.initializeSdk(appLovinSdkConfiguration -> {
       Log.e("sdsd", appLovinSdkConfiguration.getConsentFlowUserGeography().toString());//still OTHER
});

Additional Info

No response

anh-lt commented 5 months ago

This is my fault when I did not clear storage of the application, I just uninstall and re-install but my AndroidManifest has this line android:allowBackup="true" After remove this line or clear the storage, everything works fine.