Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding events to google calendar from my app
    primarykey
    data
    text
    <p>I have the code. No errors in eclipse. But in the emulator, I'm getting "Application has stopped unexpectedly" error. I have done a lot of research but I'm not able to get rid of this. All I want the app to do is to add events to my google calendar.</p> <p>The code snippet:</p> <pre><code>public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set up the URL and the object that will handle the connection: URL postUrl = null; try { postUrl = new URL("http://www.google.com/calendar/feeds/xyz@gmail.com/private/full"); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } CalendarService myService = new CalendarService("exampleCo-exampleApp-1"); try { myService.setUserCredentials("xyz","xyz123"); } catch (AuthenticationException e) { // TODO Auto-generated catch block e.printStackTrace(); } EventEntry myEntry = new EventEntry(); myEntry.setTitle(new PlainTextConstruct("test event")); myEntry.setContent(new PlainTextConstruct("Working!!")); Person author = new Person("It's me", null, "me@home.com"); myEntry.getAuthors().add(author); DateTime startTime = DateTime.parseDateTime("2011-07-20T15:00:00-08:00"); DateTime endTime = DateTime.parseDateTime("2011-07-20T17:00:00-08:00"); When eventTimes = new When(); eventTimes.setStartTime(startTime); eventTimes.setEndTime(endTime); myEntry.addTime(eventTimes); try { EventEntry insertedEntry = myService.insert (postUrl, myEntry); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); } setContentView(R.layout.main); } </code></pre> <p>Is it anything to do with the code or the manifest?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload