I have an HTML file that contains Snap.svg (just a Javascript API) animation which refers to an SVG file.
window.onload = function () {
var s = Snap("#headDiv");
Snap.load("emotions.svg", function(f) {
I'm trying to get this to run locally in an Android WebView, but the funny thing is that my webpage runs perfectly only from a server when accessed with:
mWebView.loadUrl("http://www.myurl.com/index.html");
As soon as I put my webpage files into the assets folder
and access with
mWebView.loadUrl("file:///android_asset/index.html");
Everything runs fine, (including the external Javascript files) except my SVG doesn't display at all. I've tried with API 16 and 19 with the same results: runs fine from server, no SVG display from local. It makes me wonder if I'm referring to my files wrong or something.
EDIT: I also just found out that the webpage works locally in Firefox, but NOT Chrome. The issue may lie here.