This is called from a button on a page using webview. It works great except for passing in the time. What am I doing wrong?
public void addToCalendar( final long startTime, String allday, final long endTime, String title, String myLocation) {
// TODO Auto-generated method stub
Calendar cal = Calendar.getInstance();
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", cal.startTime);
intent.putExtra("allDay", allday);
intent.putExtra("rrule", "FREQ=YEARLY");
intent.putExtra("endTime", cal.endTime);
intent.putExtra("title", title);
intent.putExtra("eventLocation",myLocation);
startActivity(intent);
}
I am getting the date 1/15/1970 10:45pm and 1/15/1970 10:45pm when i try passing in
How do I pass the date time?
This is mainly @Oriharel post How to add calendar events in Android?