I am querying the android calendars db and looking for an event with particular ‘iCalGUID’ .
here is the query I am using
final Cursor cursor = resolver.query(uri.getCalendarUri(),
null, "events.iCalGUID=" + uid, null, null);
Current uid is 0804eaa1-3472-43df-96c2-af73ae5c31ab
But I am getting an exception while executing this query
android.database.sqlite.SQLiteException: unrecognized token: "0804eaa1": ,
while compiling: SELECT originalEvent, visibility, rrule, hide_declined, reminder_type, hasAlarm,
description AS suggest_text_2, rdate, transparency, timezone, dtstart, _sync_time, hasAttendeeData,
commentsUri, description, reminder_duration, htmlUri, _sync_account, _sync_version, hasExtendedProperties,
last_update_time, eventLocation, dtend, allDay, organizer, sync_source, deleted, url, originalInstanceTime, alerts_vibrate, importance, selfAttendeeStatus, eventTimezone, ownerAccount, _sync_account_type, lastDate, guestsCanModify, guestsCanSeeGuests, exrule, selected, title, _id, _sync_id, alerts_ringtone, calendar_id, access_level, _sync_local_id, title AS suggest_text_1, originalAllDay, iCalGUID, _sync_dirty, duration, parentID, color,
guestsCanInviteOthers,
exdate, eventStatus FROM view_events WHERE (1)
AND (events.iCalGUID=0804eaa1-3472-43df-96c2-af73ae5c31ab)
How could I do this in android
Thanks.
Try this: