Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. /**starting code for adding event */
  2.  
  3. event = new Event().setSummary("Meeting with employees")
  4. .setLocation("Rehman Trade Center, Sargodha Pakistan")
  5. .setDescription("Our team is going to organize a Meeting to discuss the Architecture")
  6. .;
  7. DateTime startDateTime = new DateTime("2017-11-28T09:00:00-07:00");
  8. EventDateTime start = new EventDateTime()
  9. .setDateTime(startDateTime)
  10. .setTimeZone("America/Los_Angeles");
  11. event.setStart(start);
  12.  
  13. DateTime endDateTime = new DateTime("2017-11-28T17:00:00-07:00");
  14. EventDateTime end = new EventDateTime()
  15. .setDateTime(endDateTime)
  16. .setTimeZone("America/Los_Angeles");
  17. event.setEnd(end);
  18.  
  19.  
  20.  
  21. EventAttendee[] attendees = new EventAttendee[]{
  22. new EventAttendee().setEmail("xyx@gmail.com"),
  23. new EventAttendee().setEmail("abc@gmail.com"),
  24. new EventAttendee().setEmail("axc@gmail.com"),
  25.  
  26. };
  27. // event.setAttendees(Arrays.asList(attendees));
  28.  
  29. event = mService.events().insert("primary", event).execute();
  30.  
  31. values.put(CalendarContract.Events.CUSTOM_APP_PACKAGE, getPackageName());
  32. values.put(CalendarContract.Events.CUSTOM_APP_URI, "myAppointment://1");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement