Google パブリッシャー向け ポリシー 新しい通知と同意に関する要件が導入されました。 ユーザーの正確な位置情報を広告関連の目的で Google に送信すること。
こうしたデータ共有についてユーザーに通知するために使用できるスニペットの例を、以下に記載しました。本ポリシーが適用されるパブリッシャー様はご参考になさってください。
Kotlin
protected fun presentConsentOverlay(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
protected void presentConsentOverlay(Context context) { new 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", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int 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 method: presentConsentOverlay(this);