I have
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", dateStart.getTime());
intent.putExtra("allDay", false);
intent.putExtra("rrule", "FREQ=DAILY");
intent.putExtra("endTime", dateEnd.getTime());
startActivity(intent);
To compile an event and I want to run the event one time.
The line that set the frequency is
intent.putExtra("rrule", "FREQ=DAILY");
also if I delete this line, by default the android calendar is set to DAILY if I don't change it manually.
I have looking for a list off all supported attributes and I have found MONTLY,YEARLY etc. but I can't find the right supported syntax for "one time"
Could you help me?
The proper way to set a one time only event, according to the spec linked to in the documentation, is not to specify RRULE. Are you certain the event recurs, rather than just displaying the frequency as daily and still only firing once? If so, the following should work, though it's a bit of a hack:
intent.putExtra("rrule", "FREQ=DAILY;COUNT=1");
For one time event, you can also just not set anything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With