我有以下有效的代码。
但我不希望出现确认
希望它自动进入日历上的事件
有人有建议
calIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_SINGLE_TOP
| Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_NO_HISTORY
| Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
calIntent.setType("vnd.android.cursor.item/event");
calIntent.putExtra(Events.TITLE, "SMS: "+contact);
calIntent.putExtra(Events.EVENT_LOCATION, "");
calIntent.putExtra(Events.DESCRIPTION, msgBody);
calIntent.putExtra(Events.HAS_ALARM, 0);
calIntent.putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, false);
calIntent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, System.currentTimeMillis());
calIntent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, System.currentTimeMillis()+1);
context.startActivity(calIntent);