无法将事件插入Android日历,因为禁止了403

时间:2019-12-23 17:12:11

标签: android kotlin android-contentresolver

我正在尝试使用ContentResolver将事件本地添加到用户日历 但是Google日历进行了该事件并返回其ID,然后删除了该事件,然后返回了此异常:

NOT IN (subquery)

我在AndroidManifest.xml中添加了权限

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
    {
      "errors": [
        {
          "reason": "requiredAccessLevel",
          "domain": "calendar",
          "message": "You need to have writer access to this calendar."
        }
      ],
      "message": "You need to have writer access to this calendar.",
      "code": 403
    }

这是代码:

   <uses-permission android:name="android.permission.READ_CALENDAR" />
   <uses-permission android:name="android.permission.WRITE_CALENDAR"/>

0 个答案:

没有答案