codenameone - Codename One: Getting events from Calendar throws ArrayIndexOutOfBoundException -


i trying events out of users device calendar code:

    date = new date();     java.util.calendar c = java.util.calendar.getinstance();     c.add(java.util.calendar.month, 1);     date = c.gettime();     string calendarid = dc.opencalendar(calendername, false);      collection <eventinfo> events = dc.getevents(calendarid, from, to); 

the last line exception thrown , have absolutely no idea why.

i cant deliver exception messages since cn1lib cant debugged within ide or simulator, makes hard find bug here.

when getting exception telling me:

error internal application error occurred: java.lang.arrayindexoutofboundsexception: null 

thanks in advance

devicecalendar not supported in simulator throw exception.

you can events on device , debug code snippet on device, wrap in try-catch , use log.sendlog() stacktrace in email using codename one.

remember remove log.sendlog() when you're done, otherwise, may spammed error log emails.

try {     //devicecalendar code snippet here } catch (exception ex) {    log.e(ex);    log.sendlog(); } 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -