I want to open up the Calendar application from an android application. When i searched online, all i got is to create new events using intent. I could find Intents to open
You can open Calendar View by two means:
1) by particular date 2) by particular event
For this you have to add following two permissions
1) by particular date:
Uri.Builder builder = CalendarContract.CONTENT_URI.buildUpon();
builder.appendPath("time");
ContentUris.appendId(builder, Calendar.getInstance().getTimeInMillis());
Intent intent = new Intent(Intent.ACTION_VIEW)
.setData(builder.build());
startActivity(intent);
2) by particular event:
long eventID = 200;
Uri uri = ContentUris.withAppendedId(Events.CONTENT_URI, eventID);
Intent intent = new Intent(Intent.ACTION_VIEW).setData(uri);
startActivity(intent);
Note: CalendarContract content provider was added to the Android SDK in API Level 14. For more information you can visit this link