Add Events to Calender
public static void addCalendarEvent(Context context,String title,String location, long eventStartInMillis, long eventEndInMillis) {
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", title);
intent.putExtra("eventLocation", location);
intent.putExtra("beginTime", eventStartInMillis);
intent.putExtra("endTime", eventEndInMillis);
intent.getSerializableExtra(title);
context.startActivity(Intent.createChooser(intent,"Save To calendar..."));
}
No comments:
Post a Comment