Reputation: 5152
I know how to delete and insert event in Android.
But the problem is that how can I delete the calendar event inserted by my own app.
Do I need to store all the event_id of the events inserted by my app?
But it seems it is not reliable, right? The event_id may be already become the id of other events. For example, user may manually delete the event that my app inserted and insert their own event which may have the same event_id.
Thank You.
Upvotes: 0
Views: 235
Reputation: 21036
One solution I can think of is using one of the fields to carry some kind of tag unique to your app. Like, in description you could have #MyBooksApp and then search events by that tag.
Of course, user can manually modify the event and it'll not get found but there's no way to work around that, obviously.
Another approach may be to store copy of the event or hash of name and description internally and check whether it's the same event using the hash prior to deleting.
Upvotes: 1