Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**starting code for adding event */
- event = new Event().setSummary("Meeting with employees")
- .setLocation("Rehman Trade Center, Sargodha Pakistan")
- .setDescription("Our team is going to organize a Meeting to discuss the Architecture")
- .;
- DateTime startDateTime = new DateTime("2017-11-28T09:00:00-07:00");
- EventDateTime start = new EventDateTime()
- .setDateTime(startDateTime)
- .setTimeZone("America/Los_Angeles");
- event.setStart(start);
- DateTime endDateTime = new DateTime("2017-11-28T17:00:00-07:00");
- EventDateTime end = new EventDateTime()
- .setDateTime(endDateTime)
- .setTimeZone("America/Los_Angeles");
- event.setEnd(end);
- EventAttendee[] attendees = new EventAttendee[]{
- new EventAttendee().setEmail("xyx@gmail.com"),
- new EventAttendee().setEmail("abc@gmail.com"),
- new EventAttendee().setEmail("axc@gmail.com"),
- };
- // event.setAttendees(Arrays.asList(attendees));
- event = mService.events().insert("primary", event).execute();
- values.put(CalendarContract.Events.CUSTOM_APP_PACKAGE, getPackageName());
- values.put(CalendarContract.Events.CUSTOM_APP_URI, "myAppointment://1");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement