[android-developers] Re: rrule not working
This is the piece of code that I'm using:
-- Calendar beginTime = Calendar.getInstance();
#increment one day to the actual time (just for precaution)
beginTime.add(Calendar.HOUR, 1);
beginTime.add(Calendar.DAY_OF_YEAR, 1);
startMillis = beginTime.getTimeInMillis();
ContentResolver cr = getContentResolver();
ContentValues values = new ContentValues();
values.put(Events.DTSTART, startMillis);
values.put(Events.TITLE, "eventitle bla bla bla");
values.put(Events.DESCRIPTION, "description bla bla bla");
values.put(Events.CALENDAR_ID, calID);
values.put(Events.RRULE, "FREQ=DAILY;WKST=MO");
values.put(Events.DURATION, "P3600S");
values.put(Events.EVENT_TIMEZONE, "Europe/Lisbon");
Uri uri = cr.insert(Events.CONTENT_URI, values);
Any idea why this is not working?
On Wednesday, 18 September 2013 02:06:51 UTC+1, drjunior wrote:
On Wednesday, 18 September 2013 02:06:51 UTC+1, drjunior wrote:
I've been trying to create an event in the calendar that repeats every day. I'm not using the intent mechanism, I'm creating the event inserting the event directly in the contentprovider.I'm specifying everything that is necessary:- rrule => FREQ=DAILY- event_timezone => DefaultTimezone- calendar_id- dtstart- duration.However the event's instances are not created. I've already checked the sql event record that is inserted in the db(pulled the sqlite db file from a device with root) and seems that is everything ok(I've compared the record that I'm inserting with others inserted by the google calendar app and they are similar).But if I create an event with daily recurrence using the google calendar, it creates the instances correctly, however if I create an event inside my app with daily recurrence the instances are not being created. What's can be the possible cause of this problem?
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home