1

我在 Google Play 上有一个应用程序,下载量超过 20k,评分为 4,6+,由于过去几个月有大量设备升级了 ICS,一些(不是很多)奇怪的错误开始出现。这些不是强制关闭,因为我涵盖了所有可能的 NullPointers 等,但例如错误/不工作的网络内容。

首先,这是我的应用程序的网络部分:

        HttpClient hc = new DefaultHttpClient(); //init the HttpClient
        hc.getParams().setParameter("http.protocol.content-charset", "UTF-8"); //set the encoding to UTF-8
        HttpParams hp = hc.getParams(); //get HttpParams
        HttpConnectionParams.setConnectionTimeout(hp, TIMEOUT); //set the timeout
        HttpConnectionParams.setSoTimeout(hp, TIMEOUT); //set the timeout
        HttpProtocolParams.setUserAgent(hp, ActMain.userAgent); //set the user agent
        HttpResponse resp = hc.execute(new HttpGet(item.buildQuery())); //execute the query
        Stat.result=EntityUtils.toString(resp.getEntity(), HTTP.UTF_8); //save the result

这在 Gingerbread 设备上完美运行。没有一个(据我所知)来自 Gingerbread 设备的错误报告。但是,一些报告来自 ICS 设备,例如,查询结果为空,应用程序会说给定选项没有这样的结果。同样,由于没有实际的强制关闭或任何真实报告,我不确定我提供的代码是否导致错误,我不确定问题的根源是否是 Gingerbread vs ICS 事物,它只是一个疯狂的猜测,但我能从报告中发现的唯一共同点是 ICS。

我真正的问题是这样的:ICS 会导致上述错误吗?我不应该这样想,因为我使用标准的 apache http 东西,但谁知道呢,值得一试。

感谢您的任何反馈!

4

0 回答 0