সুনির্দিষ্ট অবস্থান তথ্য নীতি

Google প্রকাশক নীতিগুলির সাম্প্রতিক আপডেটগুলি প্রকাশকদের জন্য নতুন বিজ্ঞপ্তি এবং সম্মতির প্রয়োজনীয়তা প্রবর্তন করেছে যারা বিজ্ঞাপন-সম্পর্কিত উদ্দেশ্যে ব্যবহারকারীদের সুনির্দিষ্ট অবস্থানের ডেটা Google-এ পাস করে।

যদি এই নীতিটি আপনার ক্ষেত্রে প্রযোজ্য হয়, নীচের স্নিপেটটি দেখায় যে আপনি এই ডেটা ভাগ করে নেওয়ার বিষয়ে আপনার ব্যবহারকারীদের জানাতে পারেন:

জাভা

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);

কোটলিন

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)