Questions tagged [calendarcontract]

30 questions
1
vote
0 answers

Android Wear 2.0 - retrieve calendar color from iOS Apple Calendar

I have an Android Wear app that fetches calendar events via WearableCalendarContract. It works great when paired with Android phones, but I recently discovered a bug when pairing with an iOS device using the Apple Calendar, in that it would not…
rjr-apps
  • 352
  • 4
  • 13
1
vote
1 answer

Remove own events from google calendar

I've build an app which allows to synchronize the app specific data with the google calendar. To add my events to the calendar I've got the following method, which works fine. private static void addCalendarEvents(Context context, Cursor c) { …
1
vote
0 answers

Delete calendar event on Android (Samsung S-Planner)

I am working with the native calendar, and I want to delete the events in native calendar. Provided that the event ID is known. for (long eventID : eventIDList) { // delete from native calendar Uri deleteUri =…
1
vote
0 answers

Bug to insert calendar on Samsung Galaxy devices

I have a bug that only happens in the Samsung Galaxy Tab, Samsung Galaxy Win Duos and Samsung Galaxy S Duos. I am trying to insert a linked calendar to an application account: Uri calUri = CalendarContract.Calendars.CONTENT_URI; …
1
vote
2 answers

Using CalendarContract, how to determine text color?

How do I find the text color for an event, when querying through CalendarContract? I see there's a column DISPLAY_COLOR, which appears to reliably provide the background color. I do not see any column for the text color anywhere in the plethora of…
Peri Hartman
  • 19,314
  • 18
  • 55
  • 101
0
votes
1 answer

Different time of two events in a Calendar

I've been implementing an app, and was doing a DAO class with a function, which would return all events on current day. But, I have a small bug. For example: we have 2 events - event1(02:00-03:00) and event2(14:00-16:00). And we want event1 to be…
0
votes
0 answers

CalendarContract sometimes returns null values

I have a problem with calendar cursor. Sometimes, when querying data for a calendar events, attendees or simply calendar details, the cursor returns null values. Example Declare Calendar Attendee Cursor val projection =…
0
votes
0 answers

Get events from public google calendar Android

I would like to have a calendar view that would present all of the events of a public google calendar. I have an OAuth 2.0 client ID for my user and my calendar is set to PUBLIC. Then I went trough the Calendar Provider tutorial…
0
votes
1 answer

Progrommatically created Calendar not saved

I'm trying to create calendar by using code from this topic private static void createCalendar( Context mContext, Account account) { final ContentValues v = new ContentValues(); v.put(CalendarContract.Calendars.NAME,"TEST"); …
0
votes
1 answer

WearableCalendarContract query "Sort order is not supported" error

I'm getting a Sort order is not supported error when trying to apply a sort order to my query. The query runs just fine if the sort order is null. Can anyone help me here? Code is below: long currentTime =…
rjr-apps
  • 352
  • 4
  • 13
0
votes
0 answers

Use custom where clause for CalendarContract.Instances

Is it possible to query CalendarContract.Instances with a custom where clause? The normal syntax for using this URI is: Uri.Builder builder = CalendarContract.Instances.CONTENT_URI.buildUpon(); ContentUris.appendId (builder,…
Peri Hartman
  • 19,314
  • 18
  • 55
  • 101
0
votes
1 answer

How to get all events of two calendars in android

In my app I use two calendars, lets say calendar "business" with CalendarContract.Events.CALENDAR_ID = 1, and calendar "privat" with CalendarContract.Events.CALENDAR_ID = 2. If the user chooses to see the events of both calendars in my app, I…
roland
  • 227
  • 3
  • 11
0
votes
1 answer

CalendarContract query with limit

How can I query CalendcarContract.Instances with a LIMIT clause? I would like to query starting with a particular start date for a LIMIT of "n" rows. What I've tried is: final Uri uri = Uri.parse(CalendarContract.Instances.CONTENT_URI + "/" + …
Peri Hartman
  • 19,314
  • 18
  • 55
  • 101
0
votes
1 answer

Getting events from a specific calendar and specific date using Calendar Provider/Calendar.Contract

Ok so i am making an app which extracts the scynced calendars from the phone and displays them, i have read through many tutorials but i am still unsure how to do this. I want to extract a calendar with the ACCOUNT_TYPE "ca.ryerson" (it is powered…
TanmayP
  • 706
  • 1
  • 6
  • 12
0
votes
1 answer

Android CalendarContract Account Name Issue

I am having an issue with selecting an account using the CalendarContract API. I get the following error: Caused by: android.database.sqlite.SQLiteException: near "@iancorneli": syntax error (code 1): , while compiling: SELECT _id FROM Calendars…
user1228883
1
2