Android Start calendar intent with start and end time
<p>I have an app with an agenda with list of times and date. When user clicks one of these events, the Calendar intent should start so should bring up the Calendar with the time, date and reminder preset. However when I load up the intent, the start time is just the current time and the end time is an hour ahead. Could someone please tell me what I am doing wrong. Here is example of hard coded calendar with date and time set up I am testing with</p>

<pre><code>Calendar startDate = Calendar.getInstance();
                startDate.set(Calendar.MONTH, 8);
                startDate.set(Calendar.YEAR, 2012);
                startDate.set(Calendar.DAY_OF_MONTH, 5);
                startDate.set(Calendar.HOUR_OF_DAY, 9);


                // Set the calendar
                Calendar endDate = Calendar.getInstance();
                endDate.set(Calendar.MONTH, 8);
                endDate.set(Calendar.YEAR, 2012);
                endDate.set(Calendar.DAY_OF_MONTH, 5);
                endDate.set(Calendar.HOUR_OF_DAY, 15);
                endDate.set(Calendar.MINUTE, 30);

                Intent intent = new Intent(Intent.ACTION_EDIT);
                intent.putExtra("calendar_id", 1);
                intent.setType("vnd.android.cursor.item/event");
                intent.putExtra("beginTime", startDate.getTime());
                intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
                        | Intent.FLAG_ACTIVITY_SINGLE_TOP);
                intent.putExtra("allDay", false);
                intent.putExtra("endTime", endDate.getTime());
                intent.putExtra("title", "A Test Event from android app");
                intent.putExtra("description", "Your consulting date and time ");
                startActivity(intent);
</code></pre>

<p>Any help would be much appreciataed!!</p>
