G2 and json parsing 
<p>I am currently developing an android app for 1.6 that parses a json file received from a server and then displays the results in a listview. So far all of my beta testers have had no issues except for one who owns an HTC G2 running on Android 2.2. He said that he does not see anything on his listview, making me think that there was some problem with the json retrieving or parsing. He also said that he did not have any internet issues while running the app. Even my "refresh" option does not solve his problem. I am wondering if there is anything particularly different about the G2 that would cause this. Here is the code where I deal with the JSON. </p>

<p>First I use an OAuth client to get the file</p>

<pre><code>OAuthMessage request = accessor.newRequestMessage(method, url, parameters); 
response = client.invoke(request, OAuthClient.ParameterStyle.BODY); 
if (("application/json; charset=utf-8").equals(response.getBodyType())) {
                return response.readBodyAsString();
</code></pre>

<p>I also display a toast if there was an issue with the json fetching</p>

<pre><code>        if (result instanceof Exception) {
        // If failed during refreshing vouchers, show message to user
        if (USER_REFRESH.equals(flag) || SYSTEM_REFRESH.equals(flag)) {
            ((ListVouchers)context).getProgressDialog().cancel();
            Toast.makeText(context, "Could not load. Try again later.", Toast.LENGTH_LONG).show();
        }
</code></pre>

<p>Then I store information from the JSON into a database:</p>

<pre><code>    JSONArray jArray = new JSONArray(params[0]);
            int jarrayLength = jArray.length();
            //Create a set of the ids in the json
            for (int i  = 0; i &lt; jarrayLength; i++) {
                JSONObject jsonObj = jArray.getJSONObject(i);
            JSONObject categoryObj = jsonObj.getJSONObject("category");
                    values.put("categoryName", categoryObj.getString("name"));
                    values.put("categoryId", categoryObj.getString("id")); }
                        contentResolver.insert(CONTENT_URI, values);
</code></pre>

<p>Does anyone have any idea why a G2 in particular would not do this correctly? The user is reporting no crashes, just that he sees my empty view where there is supposed to be information from the json. The only issue I think would cause this is a lack of space but I don't think the user's phone can't store a few kb of json text. I have done an admin login of his account and it works fine on the phones I use for testing. </p>

<p>Edit:</p>

<p>I have asked the user for a logcat and it seems the problem stems from this error:</p>

<pre><code>org.json.JSONException: Value other of type java.lang.String cannot be converted to JSONArray
</code></pre>

<p>which happens on this line, where params[0] is the result from the server:</p>

<pre><code>JSONArray jArray = new JSONArray(params[0]);
</code></pre>

<p>Could this have to do with certain phones handling text files differently? It seems that the result is not being detected as a json file</p>
