2011-09-05 10 views
1

내 앱에서 이벤트를 추가해야합니다. 이벤트의 시작 날짜, 종료 날짜, 시작 시간, 종료 시간 및 설명이 있습니다. 시작 날짜와 종료 날짜를 이벤트에 추가하는 방법을 모르겠습니다.Android에서 이벤트 추가 문제가 발생했습니다.

나는 다음 코드를 사용합니다

  Intent intent = new Intent(Intent.ACTION_EDIT); 
      intent.setType("vnd.android.cursor.item/event"); 
      intent.putExtra("beginTime", cal.getTimeInMillis()); 
      intent.putExtra("allDay", false); 
      intent.putExtra("rrule", "FREQ=DAILY"); 
      intent.putExtra("endTime", cal.getTimeInMillis()+60*60*1000); 
      intent.putExtra("title", "A Test Event from android app"); 
      startActivity(intent); 

을 그리고 나는이 코드를 실행할 때 추가하거나 달력에서 취소하라고 요구합니다. 하지만 내 필요는 그것이 사용자 상호 작용없이 추가되어야한다는 것입니다. 도와주세요.

답변

관련 문제