When Android WebView load a webpage, replace the picture inside the page with a local picture

Source: Internet
Author: User

============ Problem Description ============


RT, which is essentially designed to prevent web page images from loading, place images locally, and then replace them in the app to speed up the response.
Previously mentioned this problem, failed to solve, Because more than 3.0 to provide the interface to replace the Web resources (webresourceresponse), 3.0 does not have a dedicated interface, I want to use get to save the page as a string and then replace, but found that not all pages can use get Fetch (many pages are reported exception, including some links in Baidu) , studied for some time, thought cannot realize, gave up.
Today, suddenly found a game, called Bahamut's anger, the discovery is also a web game, the image loading super-fast, and then anti-compilation, found that there are a large number of images in the app ... It was only then that the thing could be realized.
So I ask you, Daniel, can you provide some ideas, this thing exactly how to achieve--| |

============ Solution 1============


You're not anti-compilation, so you see how it's going to come true.

When Android WebView load a webpage, replace the picture inside the page with a local picture

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.