How to Call Calendar in my Application using Intents?
Asked
Active
Viewed 2,544 times
2 Answers
4
You need an Intent
that looks something like this:
Intent calendarIntent = new Intent(Intent.ACTION_EDIT);
calendarIntent.setType("vnd.android.cursor.item/event");
calendarIntent.putExtra("title", "Title");
calendarIntent.putExtra("beginTime", startTimeMillis);
calendarIntent.putExtra("endTime", endTimeMillis);
calendarIntent.putExtra("description", "Description");
You can then start it by calling this:
startActivity(calendarIntent);

nicholas.hauschild
- 42,483
- 9
- 127
- 120
-
And here are the available intents: http://developer.android.com/guide/topics/providers/calendar-provider.html#intents – Nuno Silva Dec 10 '14 at 15:03
0
Do you mean the calendar app or the form for adding a new event to the calendar?
Either way. Refer to this answer: