Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Las actualizaciones recientes de las Políticas para Publicadores de Google introdujeron nuevos requisitos de aviso y consentimiento para los publicadores que transfieren datos de ubicación precisos de los usuarios a Google con fines relacionados con los anuncios.
Si esta política se aplica a ti, el siguiente fragmento muestra una forma en la que puedes informar a los usuarios sobre este uso compartido de datos:
Kotlin
protectedfunpresentConsentOverlay(context:Context){AlertDialog.Builder(context).setTitle("Location data").setMessage("We may use your location, "+"and share it with third parties, "+"for the purposes of personalized advertising, "+"analytics, and attribution. "+"To learn more, visit our privacy policy "+"at https://myapp.com/privacy.").setNeutralButton("OK"){dialog,which->dialog.cancel()// TODO: replace the below log statement with code that specifies how// you want to handle the user's acknowledgement.Log.d("MyApp","Got consent.")}.show()}// To use the above function:presentConsentOverlay(this)
Java
protectedvoidpresentConsentOverlay(Contextcontext){newAlertDialog.Builder(context).setTitle("Location data").setMessage("We may use your location, "+"and share it with third parties, "+"for the purposes of personalized advertising, "+"analytics, and attribution. "+"To learn more, visit our privacy policy "+"at https://myapp.com/privacy.").setNeutralButton("OK",newDialogInterface.OnClickListener(){@OverridepublicvoidonClick(DialogInterfacedialog,intwhich){dialog.cancel();// TODO: replace the below log statement with code that specifies how// you want to handle the user's acknowledgement.Log.d("MyApp","Got consent.");}}).show();}// To use the above method:presentConsentOverlay(this);
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-05-04 (UTC)"],[[["Google Publisher Policies now require publishers to obtain user consent before passing precise location data for ads-related purposes."],["Publishers need to clearly inform users about how their precise location data is being used and shared with third parties, such as for personalized advertising, analytics, and attribution."],["The provided code snippets offer examples of how to present a consent overlay to users, but they need to be customized to accurately reflect each publisher's specific data sharing practices."],["Publishers should replace the placeholder comments in the code snippets with their own logic for handling user acknowledgement of the data sharing disclosure."]]],["Google's updated Publisher Policies require publishers to notify users about sharing precise location data for ads. Publishers must obtain user consent for this data sharing. Example code snippets in Kotlin and Java are provided to show how to inform users via a consent overlay. The code displays a message stating that the app may use and share user location for personalized advertising, analytics, and attribution, and directs users to the privacy policy for further information. Customization of the provided code is needed.\n"]]