Reputation: 671
I have this situation. Lets say that today is 03.12
| 01.12 | 02.12 | 03.12 | 04.12 |
| | rec#1 | rec#1 | rec#1 |
| | | rec#2 | rec#2 |
| rec#3 | | rec#3 | rec#3 |
| | | evt#1 | |
rec#1 is recurring event which starts on 02.12. and its everyday. rec#2 is recurring event which starts on 03.12 (today) and its everyday. rec#3 is recurring event which starts on 01.12 and its every 2nd day. evt#2 is an simple event which for one day 03.12 (today)
Now I want to query Calendar Provider for all events for today. So I put in where clause condition for CallendarContract.Events.DTSTART BETWEEN 03.12 00:00 AND 03.12 23:59 But than I receive only rec#2 and evt#1 rec#2 because its first occurrence of this recurring event. And evt#1 because it fits query.
My questions is:
This is possible to receive form Calendar Provider all events which occur for given scope? For this example I want get as well rec#1 and rec#3
Now I have an idea to get all recurring events and calculate them in java but I want do that in better way. I don't want to load unnecessary recurring events and waste resources for calculating if this event fits or not.
Upvotes: 0
Views: 674
Reputation: 3782
I think what you are looking for is the instances table: http://developer.android.com/guide/topics/providers/calendar-provider.html#instances
Upvotes: 2