¡@

Home 

2014/10/16 ¤W¤È 08:11:00

android Programming Glossary: calendarid

Delete calendar entries

http://stackoverflow.com/questions/5806174/delete-calendar-entries

improve this question I use this for delete private void deleteEvent ContentResolver resolver Uri eventsUri int calendarId Cursor cursor if android.os.Build.VERSION.SDK_INT 7 up to Android 2.1 cursor resolver.query eventsUri new String _id Calendars._id.. if android.os.Build.VERSION.SDK_INT 7 up to Android 2.1 cursor resolver.query eventsUri new String _id Calendars._id calendarId null null else 8 is Android 2.2 Froyo http developer.android.com reference android os Build.VERSION_CODES.html cursor resolver.query.. reference android os Build.VERSION_CODES.html cursor resolver.query eventsUri new String _id calendar_id calendarId null null while cursor.moveToNext long eventId cursor.getLong cursor.getColumnIndex _id resolver.delete ContentUris.withAppendedId..

Insert multiple events in Android calendar

http://stackoverflow.com/questions/8688837/insert-multiple-events-in-android-calendar

data through ContentResolver. A piece of code to insert an event could be like this public String addEvent String calendarId String title long startTime long endTime int allDay ContentValues event new ContentValues event.put calendar_id calendarId.. String title long startTime long endTime int allDay ContentValues event new ContentValues event.put calendar_id calendarId for insert event.put title title event.put description event.put eventLocation event.put allDay allDay event.put eventStatus..