Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android create calendar event

Tags:

android

I need to create multiple calendar event for Android application, Using this question I was able to create single event.

Is there any example or guide for create multiple calender events?

Thank You, Chandana

like image 746
Chandana Avatar asked Apr 21 '26 11:04

Chandana


1 Answers

place these in a function

like

public void calenderevent(Calendar begintime, Calendar endtime){

    Intent intent = new Intent(Intent.ACTION_EDIT);
    intent.setType("vnd.android.cursor.item/event");
    intent.putExtra("beginTime", begintime.getTimeInMillis());
    intent.putExtra("allDay", true);
    intent.putExtra("rrule", "FREQ=YEARLY");
    intent.putExtra("endTime", endtime.getTimeInMillis()+60*60*1000);
    intent.putExtra("title", "A Test Event from android app");
    startActivity(intent);
}
like image 120
PedroAGSantos Avatar answered Apr 22 '26 23:04

PedroAGSantos