Closed JDaniel41 closed 7 years ago
Yeah. I think you're right about the Android phone freaking out about not having an additional value returned. The .getEvents() method takes quite a well to pull every event from a year. The first thing I would try is to create a separate thread in your Android application that loads the events, and then you can just display a "downloading" dialog to the user. I can possibly the method to return each event as soon as it gets it if you'd like. But first thing I'd do is try to put it in a separate thread because Android doesn't like load times within the onCreate() method as far as I know.
So, the thread creation is working. I just need to add the Downloading box for users, but what would really be nice is if there was a function that searches the events by the names instead of the event codes. That's what I'm trying to accomplish with the thread, and it would speed up the process. Thanks again for the advice!
Awesome. I love the idea of some sorting methods. I think I'll create a new class called Sort that can sort through lists by name, number, date, etc. Would you mind putting together a list of things for me that'd you like to see sortable, as well as different things you can sort with, if you don't mind.
Whenever I try to use the
getEvents()
method in my team's Android Studio app, it always throws this exception.However, if I try running this in Dr. Java or any other Java compiler, there will be a delay, but it will return an array of every event. I think that the Android phone is just freaking out over the fact that there is no initial return, but how can I make it wait?
SAMPLE CODE that is being ran in
onCreate()
: