Skip to content

Instantly share code, notes, and snippets.

@mlc
Created October 19, 2012 20:20
Show Gist options
  • Save mlc/3920469 to your computer and use it in GitHub Desktop.
Save mlc/3920469 to your computer and use it in GitHub Desktop.
Adding to the calendar on Android
Intent calendarIntent = new Intent(Intent.ACTION_EDIT)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.setType("vnd.android.cursor.item/event")
.putExtra("beginTime", state.time)
.putExtra("endTime", state.endTime)
.putExtra("title", name)
.putExtra("description", calendarDescription)
.putExtra("eventLocation", address);
startActivity(calendarIntent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment