精确位置数据政策

如果您向 Google 传递用户的精确位置数据,Google 发布商政策会向您提供用户意见征求要求和通知。

如果该政策适用于您,以下示例会设置标题、消息和按钮文本,以向用户告知数据共享:

[SerializeField, Tooltip("Canvas panel for the location consent overlay.")]
private GameObject _consentOverlay;

[SerializeField, Tooltip("Title text for the location consent overlay.")]
private Text _titleText;

[SerializeField, Tooltip("Message text for the location consent overlay.")]
private Text _messageText;

[SerializeField, Tooltip("OK button for the location consent overlay.")]
private Button _okButton;

[SerializeField, Tooltip("OK button text for the location consent overlay.")]
private Text _okButtonText;

/// <summary>
/// Presents the location consent overlay to the user.
/// </summary>
public void PresentConsentOverlay()
{
    if (_consentOverlay == null)
    {
        return;
    }

    _titleText.text = "TITLE";
    _messageText.text = "MESSAGE_TEXT";
    _okButtonText.text = "BUTTON_TEXT";

    _okButton.onClick.RemoveAllListeners();
    _okButton.onClick.AddListener(() =>
    {
        _consentOverlay.SetActive(false);
        // TODO: Add any consent gathering logic.
        Debug.Log("CONSENT_RECEIVED_LOG_MESSAGE");
    });

    _consentOverlay.SetActive(true);
}

替换以下内容:

  • 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。

  • CONSENT_RECEIVED_LOG_MESSAGE:用户表示同意时要记录的日志消息,例如 Consent received。