How to read reminders in google calendars

I'm trying to read the reminders set by the user. What I mean with "reminder": currently there are two different meaning, the first one is the "alert" related to each event in the calendar and you can read them from CalendarContract.Reminders , the second one are unrelated events inserted by the user via Google Now with "remember me to...." or via Google Calendar app with insert reminder action. I'm talking about the second one. I'm reading from the event table CalendarContract.Events . However it seems that this information is not saved there or it's not accessible. Is there a different content provider for reminders?


The Reminders data seems to be held in a database accessible by the 'com.google.android.gms.reminders.provider.RemindersProvider' content provider.

Unfortunately, the provider is not exported and therefore is not accessible to third party apps.

Needless to say that the content provider is not documented and no public API exists.


Try to use 'ACTION_EVENT_REMINDER' broadcast, this intent get fired when an alarm notification needs to be posted for a reminder (android.intent.action.EVENT_REMINDER).

Here's a sample code for EVENT_REMINDER:

<receiver android:name="com.eshayne.android.CalendarTest">
<intent-filter>
<data android:scheme="content"/> 
<action android:name="android.intent.action.EVENT_REMINDER" />
</intent-filter>
</receiver>


IntentFilter filter = new IntentFilter(CalendarContract.ACTION_EVENT_REMINDER);
filter.addDataScheme("content"); 
registerReceiver(myRemindersReceiver, filter);
链接地址: http://www.djcxy.com/p/32168.html

上一篇: 在WebWorker(NWJS)中不需要节点模块

下一篇: 如何阅读谷歌日历中的提醒