This is my personal CalendarOrganizer class, they changed how a calendar can be accessed from an ice cream sandwich, because before an ice cream sandwich, it is recommended to use their online services to update the calendar, since the Google calendar can be changed or not even set.
Edit : I found out that I need to deal with the problems of intent, but also that some phones on the ice cream sandwich will come out of Intent.ACTION_INSERT, but not Intent.ACTION_EDIT. So I updated my implementation. Thanks to this post for a solution.
import android.content.Context; import android.content.Intent; import android.provider.CalendarContract; import android.provider.CalendarContract.Events; public class CalendarOrganizer { private final static int ICE_CREAM_BUILD_ID = 14; public static boolean createEvent(long startTime, long endTime, String title, String description, String location, boolean isAllDay, Context context) { int sdk = android.os.Build.VERSION.SDK_INT; if(sdk < ICE_CREAM_BUILD_ID) {
source share