Custom Unique Identifier calendar event

1k views Asked by At

I want to assign unique ids to events so I can query them (for example to avoid re-insert the event if it's already inserted). I can't see any event property for this use (calendar_id is setted automatically). I would like to avoid the use of a calendar_id <=> my_id relation of my own, using my api or whatever.

So, the question is: can I assign an unique identifier to an event so I can query for it later?

1

There are 1 answers

1
Misagh Emamverdi On BEST ANSWER

Yes you can. There is a field called UID_2445. According to documentation:

The UID for events added from the RFC 2445 iCalendar format. Column name.

However you can use this column to assign a unique identifier. Also you can use other sync columns listed in CalendarContract.EventsColumns.