How to read reminders in google calendars

后端 未结 2 1115
野趣味
野趣味 2021-02-20 13:32

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

相关标签:
2条回答
  • 2021-02-20 13:46

    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.

    0 讨论(0)
  • 2021-02-20 13:58

    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);
    
    0 讨论(0)
提交回复
热议问题