【发布时间】:2015-05-08 07:22:52
【问题描述】:
我想在将通过应用程序输入的数据与数据库进行比较时显示成功或失败。比较代码在 php 中完成,我必须显示 php 返回的字符串。但是在执行以下代码时,一些 html 文件是显示为 toast。请帮助我
InputStream is = null;
try {
is = response.getEntity().getContent();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
final String responseMsg2 = convertStreamToString(is);
runOnUiThread(new Runnable(){
@Override
public void run(){
//update ui here
Toast.makeText(getApplicationContext(),responseMsg2,Toast.LENGTH_LONG).show();
}
});
【问题讨论】:
-
您是否在浏览器中查看过您的回复?获取 html 页面的原因有很多。