Where can I find a blank monthly calendar for special events?

How to find and select events calendar in Android?

  • I am trying to implement finding and selecting events in calendar on Android Application. I believe that, find and select have completely different implementation. I have scoured the web to no avail. I would appreciate a helping hand.

  • Answer:

    manifest <uses-permission android:name="android.permission.READ_CALENDAR" /> These examples are for <= 2.1 version; first; find out which calendars exist Cursor cursor = cr.query(Uri.parse("content://calendar/calendars"), new String[]{ "_id", "displayname" }, null, null, null); cursor.moveToFirst(); String[] CalNames = new String[cursor.getCount()]; int[] CalIds = new int[cursor.getCount()]; for (int i = 0; i < CalNames.length; i++) { CalIds[i] = cursor.getInt(0); CalNames[i] = cursor.getString(1); cursor.moveToNext(); } cursor.close(); Fetching all events, and particular event is done by specifying range ContentResolver contentResolver = getContentResolver(); Uri.Builder builder = Uri.parse(getCalendarUriBase() + "/instances/when").buildUpon(); long now = new Date().getTime(); ContentUris.appendId(builder, now - DateUtils.MILLIS_PER_DAY*10000); ContentUris.appendId(builder, now + DateUtils.MILLIS_PER_DAY * 10000); and then let's say you wish to log events ID from calendar with ID = 1 Cursor eventCursor = contentResolver.query(builder.build(), new String[] { "event_id"}, "Calendars._id=" + 1, null, "startDay ASC, startMinute ASC"); // For a full list of available columns see http://tinyurl.com/yfbg76w while (eventCursor.moveToNext()) { String uid2 = eventCursor.getString(0); Log.v("eventID : ", uid2); } and for some source code check http://jimblackler.net/blog/?p=151 and http://stackoverflow.com/questions/4302209/android-calendar-events

user788511 at Stack Overflow Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.