Skip to content

Instantly share code, notes, and snippets.

@Audhil
Created February 17, 2017 05:37
Show Gist options
  • Save Audhil/c9529a8615805c4c5dd3fb3447b8e556 to your computer and use it in GitHub Desktop.
Save Audhil/c9529a8615805c4c5dd3fb3447b8e556 to your computer and use it in GitHub Desktop.
Creating a reminder in Google Calendar app found at http://stackoverflow.com/questions/5976098/how-to-set-a-reminder-in-android
Calendar cal = Calendar.getInstance();
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", cal.getTimeInMillis());
intent.putExtra("allDay", false);
intent.putExtra("rrule", "FREQ=DAILY");
intent.putExtra("endTime", cal.getTimeInMillis()+60*60*1000);
intent.putExtra("title", "A Test Event from android app");
startActivity(intent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment