HTML code:
<!DOCTYPE html>
<html>
<head>
<script src="resource://jquery.min.js"></script>
</head>
<body>
</body>
</html>
I want to intercept the protocol(resource://) and manual load Javascript into the webview. So I can store third party libs in android assets.
I tried override onLoadResource of WebViewClient and then use webView.loadData(data, mimeType, encoding); But it didn't work because the app went into a endless loop.
Found the answer, and it works perfectly! I have searched this question many times via google and stackoverflow but haven't got the right answer. And finally my roommate made it happen with just the first trying.