In my app, I want a functionality to create calendar event. I open "new calendar event" activity like this:
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 perfectly on stock Android. On HTC Sense, I have only one issue - end time is not set correctly, it's always one hour after begin time. What can be the problem?
The problem was that I had a bug in my code - the value of eventEndInMillis was wrong and it was smaller then eventStartInMillis.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With