7

How can I add events to Android default calendar on button click?

view full story
linux-howto

http://stackoverflow.com – protected void addToCalendar() { final ContentResolver cr = this.getContentResolver(); Cursor cursor = cr.query(Uri.parse("content://com.android.calendar/calendars"), new String[]{ "_id", "displayName" }, null, null, null); cursor.moveToFirst(); String[] calNames = new String[cursor.getCount()]; final int[] calIds = new int[cursor.getCount()]; Log.i("Cal Names Length", "Length of Cals:"+calNames.length); Log.i("Names of calendar:", "Cal names:"+calNames.toString()); for (int i=0; i<calNames.length; i++) { (HowTos)