I'm launching a calendar-insertion activity using the following:
Intent intent = new Intent(Intent.ACTION_INSERT);
intent.setType("vnd.android.cursor.item/event");
Calendar cal = Calendar.getInstance();
long startTime = cal.getTimeInMillis();
long endTime = startTime + 60 * 60 * 1000;
intent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, startTime);
intent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, endTime);
intent.putExtra(Events.TITLE, "Frank Zappa Live");
intent.putExtra(Events.EVENT_LOCATION, "Madison Square Garden");
startActivity(intent);
So far so good. But how can I know if the user opted to cancel?