阅读背景:

Android中用于使用Web服务的HTTP客户端的最佳实现是什么?

来源:互联网 

I have the following RESTful code which reaches out to this web service and posts a value and gets a return. The code works, however as you can see it is located in the MainActivity in the onCreate() method. I shouldn't have to go into details to explain that this is a bad practice. So, what should I do in order to place this code in order to have the app have the best performance and doesn't crash. I guess what I'm looking for is something like a design pattern in order to implement the most robust application using HTTPClient to consume a web service. thanksI have the following RESTful code which reaches




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: