【问题标题】:Google People API - How to remove a contact's text birthday?Google People API - 如何删除联系人的文字生日?
【发布时间】:2020-04-14 08:45:06
【问题描述】:

尝试使用 Google APIs Client Library for Java 删除现有联系人的生日,但如果之前有文本值,则永远不会从联系人中删除生日。

List<Birthday> birthdays = new ArrayList<>();

if (textBirthday != null) {
    Birthday birthday = new Birthday();
    birthday.setText(textBirthday); // some textual representation of a birthday    
    birthdays.add(birthday);
}

person.setBirthdays(birthdays);

如果之后所有生日都从人员实例中删除,生日将继续显示在联系人卡片中(例如,在https://contacts.google.com/ 网络视图中)。

这仅在以前的日期以“文本”格式存在时发生;使用年+月+日的日期表示,空的生日列表生效,生日被删除。

编辑:

这是使用 People API updateContact 测试 Rest 接口可见的:

应该如何删除文字生日?

【问题讨论】:

    标签: java updates google-people-api


    【解决方案1】:

    我发现这实际上是一个错误。我冒昧地在 Google 问题跟踪器中报告它:https://issuetracker.google.com/issues/153947692

    【讨论】:

      猜你喜欢
      • 2021-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-07
      • 1970-01-01
      相关资源
      最近更新 更多