Я хочу отправить SMS из календаря Google с помощью приложения Java.Я создаю настольное приложение Java и добавляю библиотеки gdata-calendar-2.0.jar
, gdata-client-1.0.jar
в библиотеки.
После этого я создаю кнопку и вставляю этот код в jButton1ActionPerformed
:
CalendarService myService = new CalendarService("exampleCo-exampleApp-1.0");
myService.setUserCredentials("root@gmail.com", "pa$$word");
URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/allcalendars/full");
CalendarFeed resultFeed = myService.getFeed(feedUrl, CalendarFeed.class);
System.out.println("Your calendars:");
System.out.println();
for (int i = 0; i < resultFeed.getEntries().size(); i++) {
CalendarEntry entry = resultFeed.getEntries().get(i);
System.out.println("\t" + entry.getTitle().getPlainText());
}
Iимеют такой импорт:
import com.google.gdata.client.calendar.*;
import com.google.gdata.data.calendar.*;
, но он показывает, что не может найти символ в setUserCredentials, getEntries (), getTitle () .