i want to get calendar event detail which is update or change by user in android device
Here we consider that we are adding or deleting the calendar events from code. How to know if the event updates(adding/editing/deleting calendar events) done by 开发者_开发知识库the user on his/her device ?
Not sure it is entirely possible to monitor changes to the Calendar, but you could try:
String[] projection = new String[] { "_id" };
Uri calendars = Uri.parse("content://calendar/calendars");
Cursor managedCursor = managedQuery(calendars, projection, null, null, null);
and then use registerContentObserver (see http://developer.android.com/reference/android/database/Cursor.html#registerContentObserver%28android.database.ContentObserver%29) to monitor the Cursor for changes.
Let me know if that works.
精彩评论