Created
April 10, 2017 15:32
-
-
Save slxny/49154c656a5e59219e03431247f00514 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new Intent(Intent.ACTION_INSERT) | |
.setData(CalendarContract.Events.CONTENT_URI) | |
.putExtra(CalendarContract.Events.TITLE, title) | |
.putExtra(CalendarContract.Events.EVENT_LOCATION, location) | |
.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, begin) | |
.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, end); | |
if (intent.resolveActivity(getPackageManager()) != null) { | |
startActivity(intent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment