How do you load Javascript into android webview? -


html code:

<!doctype html>     <html>         <head>             <script src="resource://jquery.min.js"></script>         </head>         <body>         </body>     </html> 

i want intercept protocol(resource://) , manual load javascript webview. can store third party libs in android assets.

i tried override onloadresource of webviewclient , use webview.loaddata(data, mimetype, encoding); didn't work because app went endless loop.

found answer, , works perfectly! have searched question many times via google , stackoverflow haven't got right answer. , roommate made happen first trying.

android webview javascript assets


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -