Wednesday, April 23, 2014

Get less data from the interface


private void obtainData () {
waitingDialog = WaitingDialog.showDialog (this);
new Thread (new Runnable () {
public void run () {
Map map = new HashMap ();
Message message = new Message ();
map.put ("ActivityID", ActivityID);
try {
try {
InputStream inputStream = ApiClient.getData ("activity",
map);
try {
List tips = HuodongParse.parseData (
inputStream, HuodongList.this);

message.what = LOAD_SUCCESS;
message.obj = tips;
} Catch (AppException e) {
message.obj = AppException.server (e);
message.what = PARSE_ERROR;
count + +;
}
} Catch (AppException e) {
message.obj = AppException.server (e);
message.what = LOAD_ERROR;
}
} Finally {
handler.sendMessage (message);
}
}
.}) Start ();

}
These are my data acquisition methods, determining a data, but get less, ((List ) msg.obj). Size () is 0, the Great God help see where the problem, if the code is not clear incomplete know where help may appear to say a few, very grateful! ! !
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Add, has been message.what = LOAD_SUCCESS, is not data
Reply:
I would not, Bangding. . .
Reply:
First, the interface must be set correctly. . .
InputStream inputStream = ApiClient.getData ("activity",
map);

No comments:

Post a Comment