Hello! I recently implemented GDPR message to my game with Unity. I can see the message on Unity Editor also I can see it when I build an apk and test it on my phone.
But in the internal test of the game, the message doesn't show up.
I don't understand why it shows up on apk but not in the internal test.
How can I solve this problem?
This is my code for the message;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GoogleMobileAds.Ump.Api;
public class GDPRScript : MonoBehaviour
{
ConsentForm _consentForm;
void Start()
{
var debugSettings = new ConsentDebugSettings
{
// Geography appears as in EEA for debug devices.
DebugGeography = DebugGeography.EEA,
TestDeviceHashedIds = new List<string>
{
"CD704D23723BD6DA9DC9475F8BFEFDB6"
}
};
// Here false means users are not under age.
ConsentRequestParameters request = new ConsentRequestParameters
{
TagForUnderAgeOfConsent = false,
ConsentDebugSettings = debugSettings,
};
// Check the current consent information status.
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
void OnConsentInfoUpdated(FormError error)
{
if (error != null)
{
// Handle the error.
Debug.Log(error);
return;
}
if (ConsentInformation.IsConsentFormAvailable())
{
LoadConsentForm();
}
// If the error is null, the consent information state was updated.
// You are now ready to check if a form is available.
}
void LoadConsentForm()
{
// Loads a consent form.
ConsentForm.Load(OnLoadConsentForm);
}
void OnLoadConsentForm(ConsentForm consentForm, FormError error)
{
if (error != null)
{
// Handle the error.
Debug.Log(error);
return;
}
// The consent form was loaded.
// Save the consent form for future requests.
_consentForm = consentForm;
// You are now ready to show the form.
if (ConsentInformation.ConsentStatus == ConsentStatus.Required)
{
_consentForm.Show(OnShowForm);
}
}
void OnShowForm(FormError error)
{
if (error != null)
{
// Handle the error.
Debug.Log(error);
return;
}
// Handle dismissal by reloading form.
LoadConsentForm();
}
}
and I am attaching my GDPR message;