执行请求而不添加侦听器

时间:2014-01-29 07:35:10

标签: android datadroid

在DataDroid Library中,为了执行我们使用的请求 execute(request, listner)

有没有使用listner执行请求的方法?

I need to send Information to server and for which the response is not related to    user.So, I will handle error and success case in Operation.
I dont want to override methods : 
onRequestFinished(),
onRequestConnectionError(),
onRequestDataError()
as there is no UI updation.

2 个答案:

答案 0 :(得分:0)

AsyncTask应该适合你。您可以在doInBackground中执行任何操作,并在onPostExecute中返回结果,并且可以从那里操作UI(如果需要)。否则它只是一个与您的服务器通信的后台线程。

答案 1 :(得分:0)

我得到了解决方案:execute(request,null)。