how to connect and retrive data from one webserver through coding in android application?
How to achieve this ? Give me sample code for this
how to connect and retrive data from one webserver through coding in android application?
How to achieve this ? Give me sample code for this
One way is using HttpClient, and there are examples from Apache. Also see this blog post for an Android specific example.
If the java.net
package is available on Android, you can use the URL class.
import java.net.*;
...
URL url = new URL("http://example.com/whatever");
return (String) url.getContent();