mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-02 03:36:50 +01:00
limit events at ics with BEGIN:VEVENT and END:VEVENT
This commit is contained in:
parent
a5ed7a28ce
commit
af377210fe
@ -15,8 +15,14 @@ class IcsExporter {
|
||||
var eventsFailed = 0
|
||||
|
||||
fun exportEvents(context: Context, path: String, events: ArrayList<Event>): ExportResult {
|
||||
File(path, "events_${System.currentTimeMillis() / 1000}.ics").bufferedWriter().use { out ->
|
||||
val filename = "events_${System.currentTimeMillis() / 1000}.ics"
|
||||
File(path, filename).bufferedWriter().use { out ->
|
||||
out.writeLn(BEGIN_CALENDAR)
|
||||
for (event in events) {
|
||||
out.writeLn(BEGIN_EVENT)
|
||||
|
||||
out.writeLn(END_EVENT)
|
||||
}
|
||||
out.writeLn(END_CALENDAR)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user