How to Call 开发者_开发技巧Calendar in my Application using Intents?
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);
Do you mean the calendar app or the form for adding a new event to the calendar?
Either way. Refer to this answer:
how can i open the calendar from my app?
精彩评论