简体   繁体   English

如何在Android中以编程方式在日历中创建提醒(不是事件)?

[英]How to create a Reminder (not Event) in Calendar programmatically in Android?

I want to create a reminder in Google Calendar from my Android app. 我想通过我的Android应用在Google日历中创建提醒

Creating events is well-documented, there's a Calendar content provider for that. 创建事件的资料有据可查,有一个Calendar内容提供程序。 However there seems to be no content provider contract for these standalone reminders (not to be confused with event reminders, aka event notifications). 但是,似乎没有针对这些独立提醒的内容提供商合同(不要与事件提醒,又名事件通知混淆)。

In the app, "Reminders" is listed as a separate calendar along "Events", but when I query the CalendarContract.Calendars table, it's not on the list. 在应用程序中,“提醒”在“事件”中被列为单独的日历,但是当我查询CalendarContract.Calendars表时,它不在列表中。 Querying the CalendarContract.Events also doesn't list reminder events. 查询CalendarContract.Events也不列出提醒事件。 So I guess they're stored somehow differently, yet I cannot find any info on that. 因此,我想它们的存储方式有所不同,但是我找不到任何相关信息。

Is there a way to create these reminders programmatically? 有没有办法以编程方式创建这些提醒?

Okay, after some more looking, answering my own question. 好吧,再看一遍,回答我自己的问题。

There's no way to do this. 没有办法做到这一点。 Despite those reminders being a cross-application feature, there's no API to access them. 尽管这些提醒是跨应用程序功能,但没有API可以访问它们。

There's a feature request for this. 有一个功能要求

My question basically duplicates questions: [1] [2] , I didn't find them because they mentioned other apps, which share the same reminders with Calendar. 我的问题基本上重复了以下问题: [1] [2] ,我没有找到它们,因为它们提到了其他应用程序,这些应用程序与Calendar共享相同的提醒。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM