I made this code:
long eventID = 208;
Uri uri = ContentUris.withAppendedId(Events.CONTENT_URI, eventID);
Intent intent = new Intent(Intent.ACTION_VIEW)
.setData(uri);
startActivity(intent);
I made sure the EventID was correct, and the event-title showed in the view was correct.
THE PROBLEM is the event time was incorrect, like: 1970-1-1 8:00.
Why? Anyone can Help? Thanks.
You have to add the event begin & end time to intent’s extra data :
I got this working by using the values from “begin” and “end” field of an event instance.
This should work too with “dtstart” and “dtend” field from an event.