A goal that unlocks the activity of a "new calendar event"

In my application, I need functionality to create a calendar event. I open the action of the "new calendar event" as follows:

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", eventStartInMillis); intent.putExtra("endTime", eventEndInMillis); startActivity(intent); 

It works great on Android. In HTC Sense, I have only one problem - the end time is not set correctly, it is always an hour after the start. What could be the problem?

+7
android android-intent calendar
source share
1 answer

The problem was that I had an error in my code - the value of eventEndInMillis was wrong and it was less than eventStartInMillis.

+2
source share

All Articles