سياسة بيانات الموقع الجغرافي الدقيق

اختيار النظام الأساسي: 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)

جافا

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