I write some class (icalevent, calendermanager and icalexception) and create demo (demo is activity). I want to test to my iCal and write this. I can’t start activity and I don’t understand why.
this.startActivity(intent());
public Intent getIntent(){
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", theEvent.getName()); here is problem
intent.putExtra("description", theEvent.getSummary()); and here
intent.putExtra("beginTime", theEvent.getStart().getTime());and here
intent.putExtra("endTime", theEvent.getEnd().getTime()); and here
return intent;
}
public Intent intent(){
CalendarManager calandermanager = new CalendarManager();
return calandermanager.getIntent();
}
The putExtra wants a different data type for that field. Try possibly convert the time to a string?
Look here for more information on it.
http://developer.android.com/reference/android/content/Intent.html#putExtra(java.lang.String,android.os.Bundle)