Hello, I have a question concerning how classes are loaded at runtime and I am hoping someone out there has the inside scoop. Basically I am supporting an app that has a significant following. The app parses JSON responses from a web server. A handful of users are getting a JSON parse error. The common thread is these users all seem to have a particular model of phone.
With the help of a couple very committed users, I was able to get a lot of app level network logging. What I see is the following element as part of a larger JSON response giving me trouble: "virtualGuests":[] The response is loaded into a JSON array like this: JSONArray guests = result.getJSONArray("virtualGuests"); where result is a JSON object that contains among other things the empty virtual guest array. The problem appears to be that on 99% of the phones where my app runs, guests is returned as an empty JSON array, but on a handful of phones, guests comes back NULL. I've even went so far as to re-inject the recorded network stream into the program and the same input "appears" to produce different output in the case of an HTC Desire. The best I could figure is that perhaps the JAR file on this device that handles the JSON manipulation (I'm importing org.json.JSONArray), is different on the devices where the user seems to encounter this problem. That said, I'm not even all that familiar with how the import works in JAVA, and how similar the JRE process is on Android to the desktop environment. I believe I can work around this issue now that I know where the problem is manifesting. But I'd appreciate if someone out there can explain to me better how classes I import into my app get resolved at runtime so I am confident this is my issue and might give me some idea of what I may need to look out for in the future if I continue parsing JSON in this manner. Thanks in advance to anyone who takes the time to respond! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en