Questions tagged [calendarcontract]
30 questions
7
votes
1 answer
Adding Events for all days between start date and end date in google calendar Android
Adding Events for all days between start date and end date in google calendar Android. i want remainder every 3 months till end date.
This is my function
public void addEvent1(Context ctx, String title){
SimpleDateFormat df2 = new…

Elizabeth
- 1,399
- 1
- 13
- 25
7
votes
1 answer
Android CalendarContract recurring event with exception dates
I can't find a way to insert exception dates to a recurring event.
Context
I'm parsing an .ics file (ical format) with an event with success.
Here is the .ics
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar…

Benoit
- 4,549
- 3
- 28
- 45
6
votes
1 answer
Android calendar events not displaying
Hi I have the following code to add events on my calendar:
public String addCalendarEntry(CalendarDTO calendar) {
ContentValues event = new ContentValues();
ContentResolver cr = getContentResolver();
long startMillis =…

Marcos Placona
- 21,468
- 11
- 68
- 93
6
votes
3 answers
Query of "all_day" events using CalendarContract.Instances results in wrong time zone
I'm using CalendarContract.Instances to get a set of calendar events. In general my queries work fine. However, the begin and end times for events in the "holidays" calendar come back in a wrong time zone. Events in one of my personal calendars…

Peri Hartman
- 19,314
- 18
- 55
- 101
5
votes
1 answer
How do I delete my own custom corrupted calendar programmatically?
I'm working on an app that, among other things, allows the user to create reminders and save them in his calendar.
The current code first creates a local calendar, and later inserts events to it upon request, quietly (without opening the calendar…

limlim
- 3,115
- 2
- 34
- 46
4
votes
1 answer
Can't insert multiple events in Google Calendar
In my application i'm using the CalendarContract API to manage calendars and events on the Google Calendar. I'm having some problems when adding multiple events to a single calendar. In general, the problem of this method is that whenever i add a…

Ricardo Ribas
- 409
- 4
- 14
3
votes
0 answers
Custom notification for CalendarProvider events on Android
I created a Calendar using the Calendar Provider for Android. I have got it all working fine and I even get the reminders working:
public static ContentValues getReminderContentValues(long eventId) {
ContentValues cv = new ContentValues();
…

Tejas Sherdiwala
- 750
- 8
- 15
2
votes
1 answer
How to get the default CALENDAR_ID in Android?
I am trying to add Events in my app using a calender.According to CalenderContract,I need to provide a constant ID each time I add an event to the calender.I don't know how to do that.
I tried using calender_ID =1 which worked on some devices and…

Sajith Sajan
- 119
- 7
2
votes
1 answer
Why duration is NULL for recurrent event in android?
I try to implement one way synchronization with android calendar events (I need original events - not event instances). So, I have the following query:
String[] projection = new String[]{
CalendarContract.Events.DTSTART,
…

Natasha
- 973
- 9
- 24
2
votes
1 answer
CalendarContract.Events._ID is missing in Android 5.0
My app queries a particular event in CalendarContract.Events using Events._ID. This worked well until attempting to run it on a 5.0 device, now I get an exception
01-12 17:28:50.525: E/Unknown Source(18499): android.database.sqlite.SQLiteException:
…

Karen Forde
- 1,117
- 8
- 20
2
votes
0 answers
how to delete a single instance of a recurring event in android
I know this has been asked a couple of times, but there doesn't seem to be a clear answer. I am trying to delete a single instance of a recurring event (which I created in the first place). Although it's not clear which approach to take to do…

Marion McKelvie
- 424
- 1
- 5
- 15
1
vote
2 answers
Android Resolver Query for CalendarContract?
I am trying to write an app to dump Calendar entries for reference and backup. To get started, I tried to dump the column names of the CalendarContract using the code below but it always fails with an exception:
try {
Cursor cur =…

DontPanic
- 2,164
- 5
- 29
- 56
1
vote
0 answers
How to add event with reminder to calendar?
It works perfect when adding an event, I can add all the data of the event but with the reminder it doesn't work, what should I change?.
This is my code
Intent intent = new Intent(Intent.ACTION_INSERT);
…

Gift You
- 21
- 2
1
vote
0 answers
inserting multiple events into calendar is pretty slow. Can I speed that up?
I made an app that keeps track of a bunch of events, and puts them into a users calendar. It can get up to 60-70 events (in my case, not a software restriction) and it turns out that removing 60 events and inserting 60 new ones takes up to a minute…

Joozd
- 501
- 2
- 14
1
vote
0 answers
android registerContentObserver for Contacts requires READ_CONTACTS permission
I just discovered that, during app initialization my registerContentObserver for Contacts requires READ_CONTACTS permission. Obviously, for a new user on Android 6 and later, this permission won't yet be granted.
It seems to me it would be…

Peri Hartman
- 19,314
- 18
- 55
- 101