นโยบายข้อมูลตำแหน่งที่แน่นอน

เลือกแพลตฟอร์ม: Android iOS Android (เดิม)

หากคุณส่งข้อมูลตำแหน่งที่แน่นอนของผู้ใช้ไปยัง Google นโยบายผู้เผยแพร่โฆษณาของ Google จะระบุข้อกำหนดด้านความยินยอมและประกาศให้คุณทราบ

หากนโยบายนี้มีผลกับคุณ ตัวอย่างต่อไปนี้จะตั้งค่าข้อความชื่อ ข้อความ และปุ่มเพื่อแจ้งให้ผู้ใช้ทราบเกี่ยวกับการแชร์ข้อมูล

Kotlin

protected fun presentConsentOverlay(context: Context) {
  AlertDialog.Builder(context)
      .setTitle("TITLE")
      .setMessage("MESSAGE_TEXT")
      .setNeutralButton("BUTTON_TEXT") { dialog, which ->
        dialog.cancel()
        Log.d("APP_TAG", "CONSENT_RECEIVED_LOG_MESSAGE")
      }
      .show()
}

// To use the previous function, call:
presentConsentOverlay(this)

Java

protected void presentConsentOverlay(Context context) {
  new AlertDialog.Builder(context)
      .setTitle("TITLE")
      .setMessage("MESSAGE_TEXT")
  .setNeutralButton("BUTTON_TEXT", new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
      dialog.cancel();
      Log.d("APP_TAG", "CONSENT_RECEIVED_LOG_MESSAGE");
    }
  })
  .show();
}

// To use the previous method, call:
presentConsentOverlay(this);

แทนที่ค่าต่อไปนี้

  • TITLE: ชื่อกล่องโต้ตอบความยินยอม เช่น Location data
  • MESSAGE_TEXT: ข้อความของกล่องโต้ตอบความยินยอม เช่น

    We may use your location and share with third parties for the
    purposes of personalized advertising, analytics, and attributions. To learn
    more, visit our privacy policy at example.com.
    
  • BUTTON_TEXT: ข้อความของปุ่มกล่องโต้ตอบความยินยอม เช่น OK

  • APP_TAG: แท็กบันทึกของแอปพลิเคชัน เช่น MainActivity

  • CONSENT_RECEIVED_LOG_MESSAGE: ข้อความในบันทึกที่จะ บันทึกเมื่อผู้ใช้ให้ความยินยอม เช่น Consent received