2016-11-14 39 views
0

我使用此代碼添加日曆事件:如何按意圖在日曆事件中重複? - ANDROID

Calendar cal = Calendar.getInstance();    
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); 

但在日曆應用REPEAT默認設置的每日。我應該如何改變這個問題'不重複'?

回答

0

不這樣:要重複每天的基礎上的事件

intent.putExtra("rrule", "FREQ=DAILY"); 

狀態?你有沒有嘗試刪除這條線?

+0

它可以... xd我會稍後檢查,ty – remes