views:

51

answers:

2

I'm attempting to develop an application that scapes html of a site for relevant data and then display it back to the user in a more UI friendly way. I'm assuming that you can start a webView by

mWebView = (WebView) findViewById(R.id.webview);

but never setting the content to the actual view. So now my question is, can I take the html from the webview, scrape it, then somehow have the webview post back the forms, all while staying in the background? Any help is appreciated.

Or does anyone know of source such as htmlunit that will compile within android?

A: 

So now my question is, can I take the html from the webview, scrape it, then somehow have the webview post back the forms, all while staying in the background?

You cannot get the HTML from WebView. You are welcome to use HttpClient for your HTTP requests, and you can get HTML from those and submit Web forms as needed.

CommonsWare
A: 

I have found out how to extract the HTML from the WebView using JavaScript thanks the guide on this site http://lexandera.com/category/webview_examples/ but I am still searching on how to return post forms to webView. Perhaps through javascript aswell?

Alejandro Huerta