partiz partiz - 1 year ago 82
Android Question

Access Meta Data from android WebView

How to access Meta Data of a HTML page loaded into a WebView in Android?

I search for hours and google and I coudn't find any answer.

I only could get url and title by this code:


Dose is it imposible and webview not support it?

Answer Source

Don't open the URL in the WebView.

First. open an HttpURLConnection to the URL. Read the output from the server and you can scan through the server response to find your meta data.

As you are reading the server output, write the data into a buffer, then use loadData instead of loadUrl to display the buffered data in the WebView

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download