Android 在不添加listner的情况下执行请求
在DataDroid库中,为了执行请求,我们使用Android 在不添加listner的情况下执行请求,android,datadroid,Android,Datadroid,在DataDroid库中,为了执行请求,我们使用 execute(请求,列表器) 有没有不使用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 : onReque
execute(请求,列表器)
有没有不使用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.
应该对你有用。您可以在doInBackground中执行任何您想要的操作,并在onPostExecute中返回结果,如果需要,您可以从那里操作UI。否则,它只是一个与服务器通信的后台线程。我得到了解决方案:执行(请求,null)。您的答案与我的问题无关。谢谢你的回答你只说了安卓和服务器之间的通信,所以我建议自然的方式。