I know how to load site\'s content in Android using WebView (webview.loadUrl(\"http://slashdot.org/\");)
And how can I put site\'s content in String variable(After I\'d
Here is a pragmatical answer to your question:
HttpClient httpClient = new DefaultHttpClient();
HttpContext localContext = new BasicHttpContext();
HttpGet httpGet = new HttpGet("http://www.spartanjava.com");
HttpResponse response = httpClient.execute(httpGet, localContext);
String result = "";
BufferedReader reader = new BufferedReader(
new InputStreamReader(
response.getEntity().getContent()
)
);
String line = null;
while ((line = reader.readLine()) != null){
result += line + "\n";
}
// Now you have the whole HTML loaded on the result variable
http://www.spartanjava.com/2009/get-a-web-page-programatically-from-android/