Java – How to get to edit events in the calendar with programming code?

How to get to edit events in the calendar with programming code?… here is a solution to the problem.

How to get to edit events in the calendar with programming code?

How do I access edit events in my calendar through programming code?
Any help is greatly appreciated and thanks in advance.
enter image description here

Solution

Using this intent you might get a solution:

Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", "Some title");
intent.putExtra("description", "Some description");
intent.putExtra("beginTime",  cal.getTimeInMillis());
intent.putExtra("endTime",  cal.getTimeInMillis()+60*60*1000);
startActivity(intent);

Related Problems and Solutions