0
我尝试使用onPostExecute
方法中的字符串,但我必须为此进程编写接口或处理程序。我读了一些东西,但对我来说并不明确。我的onPostExecute
方法:如何从AsyncTask类的onPostExecute方法返回值?
protected void onPostExecute(String result) {
try {
JSONArray jArray = new JSONArray(result);
JSONObject json_data;
for (int i = 0; i < jArray.length(); i++) {
json_data = jArray.getJSONObject(i);
t = json_data.getString("name");
names.add(t);
}
} catch (JSONException e1) {
e1.printStackTrace();
} catch (ParseException e1) {
e1.printStackTrace();
}
super.onPostExecute(result);
}`
我想,我必须使用这个解决方案:http://stackoverflow.com/questions/13815807/return-value-from-asynctask-class-onpostexecute-method但我无法理解,在void onTaskCompleted(值)什么是指“价值”? – elfoz