How to request the consent of European users

0

I have tried to request the consent of European users for the new google policies, but I have not been able to use that sdk, or I do not know how to use it, I have already read the documentation but I do not get the screen where the users are requested. users that permission, I am using kotlin, I would also like to know if it is obligatory or necessary to do it in all applications. If something serves I leave part of the code I have

DebugGeography.DEBUG_GEOGRAPHY_EEA

    val consent: ConsentInformation = ConsentInformation.getInstance(this)
    val id = arrayOf("id")
    ConsentInformation.getInstance(context).addTestDevice("Aqui coloco id dispositivo")

    Log.i("prueba", "valor -> ${consent.isRequestLocationInEeaOrUnknown}")

    if (consent.isRequestLocationInEeaOrUnknown) {

        Log.i("prueba", "entro a la prueba ee")

        consent.requestConsentInfoUpdate(id, object : ConsentInfoUpdateListener {

            override fun onConsentInfoUpdated(consentStatus: ConsentStatus) {
                // User's consent status successfully updated.
            }

            override fun onFailedToUpdateConsentInfo(errorDescription: String) {
                // User's consent status failed to update.
            }
        })
    }
    
asked by Leonardo Henao 21.06.2018 в 00:18
source

0 answers