开发者

Custom Android HTTP client

开发者 https://www.devze.com 2023-04-01 02:01 出处:网络
I\'m creating an app that has to input/output data from a specific web server database. It doesn\'t need any browsing ability (in fact it definitely should not be able to browse - it must only connect

I'm creating an app that has to input/output data from a specific web server database. It doesn't need any browsing ability (in fact it definitely should not be able to browse - it must only connect to one web server). I was just about to start writing code to connect to a web service (a PHP script that I intend to write that will handle database operations), when I thought about using a WebViewClient. I can turn the PHP scriupt into a HTML/PHP form and t开发者_开发百科he user can input data as he would from his computer browser. Is this the best way to do it?


I don't get it. Why would you be trying to use a webview with PHP on Android when android has all the classes and methods you need to be able to communicate via http to a web server? Just start googling for tutorials and examples of android using http. Here's one: http://w3mentor.com/learn/java/android-development/android-http-services/example-of-http-get-request-using-httpclient-in-android/ You'll find a ton more as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号