Saving Image from WebView - Android
<p>I have a webView that detects long pressed event from an activity.</p>

<p>My aim is to save the displayed image from Google's image search.</p>

<p>However, all the data I get from HitTestResult after the long pressed is something like this:</p>

<blockquote>
  <p>data:image/png;Base64, VaQel...etc</p>
</blockquote>

<p>But when I use the default Android browser to do the same, it gives me the correct link of the image in the popup title when it is long-pressed.</p>

<p>Here is some code I am using:</p>

<pre><code>public void onWebViewLongPressed(){

    HitTestResult result = this.mWebView.getHitTestResult();

    if (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {

        Log.d("test", "extra--&gt; "+result.getExtra());
    }
}
</code></pre>

<p>I know this is a data URL scheme thing on HTML side. But how could the default browser gets the correct link while I am only getting "data:image/png;Base64...etc"?</p>

<p>Or how could I get the image link?
Thanks</p>
