Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use CalendarContract class in API Level 8

Tags:

android

After the launch of android 4, CalendarContract class is introduce to write event in device calendar. But if i have created my app using API level 8 and Now i want to use this CalendarContract class in my project done using API level 8, because in API level 8 i have use undocumented API to write event in device calendar and this code doen't work for android 4. So is it possible to use CalendarContract class in my project without changing the sdk version in manifest file, because if i change the sdk version to 14 then it allow me to use CalendarContract class and by which i can solve the issue for android 4. But on doing so my app not started running in api 8 -13, and which i dont want to do because my app is live on market. So is there any possible way to solve this problem. Please explain me with an example

like image 673
Rahul Avatar asked Mar 07 '12 12:03

Rahul


1 Answers

You cannot use CalendarContract on Android devices running less than API Level 14.

like image 87
CommonsWare Avatar answered Nov 08 '22 13:11

CommonsWare