When I was developing an APP whose API is 7 on my Nexus S, there was no problem in creating a new event on my calendar.
I used that code to get the location of the calendars on my phone:
cursor = cr.query(Uri.parse("content://com.android.calendar/calendars"), new String[]{ "_id", "displayname" }, null, null, null);
The problem came when I updated my nexus S to Android ICS 4.0. Without changing any code I got a mistake.
On logcat I could read:
- no such column:displayname,
db=/data/data/com.android.providers.calendar/databases/calendar.db
Of course cursor is null.
Maybe any change on the calendar database?
So, I’d like to know how I can create new calendar events developing an API 7 application on an Android 4.0
Thanks 😉
Calendar Provider is new to Android 4.0, so you may want to review the documentation:
http://developer.android.com/guide/topics/providers/calendar-provider.html
For versions prior to Froyo, I know that calendar was located at
content://calendar/calendars, but it’s since changed.