简体   繁体   中英

How to get deleted events on an Android calendar?

At the moment, I am working on a calendar SyncAdapter. I had no problem in creating a new calendar associated with an existing account or creating event so this part is working fine. I also achieved detecting new/modified events on the client side by using the DIRTY flag defined on CalendarContract.Events.

However, when it comes to deletion, I encounter a big difficulty: When I suppress an event through the android calendar app, it seemingly do not just set the DELETED flag to 1 but actually completely removes the event. Is there any way I can know when an event is deleted this way, since I need to inform the server about the event deletion ?

Thanks for you time and sorry for this clumsy first post on stackOverflow.

Well, I solved my problem: The event is completely deleted by the calendar application in the case where you did not put a value in the CalendarContract.Events._SYNC_ID field of the event. I hope it will maybe help someone else having the same problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM