'Google Calendar API mobile

I'm trying to add multiple events to Google Calendar, but I only can launch one event at a time.

  val intent = Intent(Intent.ACTION_INSERT)
        .setData(CalendarContract.Events.CONTENT_URI)
        .putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, startMillis)
        .putExtra(CalendarContract.EXTRA_EVENT_END_TIME, endMillis)
        .putExtra(CalendarContract.Events.TITLE, labor.jobDescription)
        .putExtra(CalendarContract.Events.DESCRIPTION, labor.jobDescription)
        .putExtra(CalendarContract.Events.EVENT_LOCATION, labor.venueName)
        .putExtra(CalendarContract.Events.AVAILABILITY, CalendarContract.Events.AVAILABILITY_BUSY)
    startActivity(intent)

Now, how can a create an intent that can add multiple days? (recurrent event doesn't for this approach)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source