I am trying to display some math equations in my Android application, but I am unsure how you use JqMath to display these equations. Could someone tell me step by step what to do to get some simple equations displayed on the Android Application? I have tried the following:
mEquationWebView = (WebView)v.findViewById(R.id.equation_webView);
WebSettings mWebSettings = mEquationWebView.getSettings();
mWebSettings.setJavaScriptEnabled(true);
String path="file:///android_asset/";
String js = "<html><head>"
+ "<link rel='stylesheet' href='file:///android_asset/mathscribe/jqmath-0.4.0.css'>"
+ "<script src = 'file:///android_asset/mathscribe/jquery-1.4.3.min.js'></script>"
+ "<script src = 'file:///android_asset/mathscribe/jqmath-etc-0.4.2.min.js'></script>"
+ "</head><body>"
+ "<script>var s = '$$x={-b±√{b^2-4ac}}/{2a}$$';M.parseMath(s);document.write(s);</script> </body>";
mEquationWebView.loadDataWithBaseURL("",js,"text/html", "UTF-8", "");
And get the following errors: Unable to open asset URL: file:///android_asset/mathscribe/jqmath-0.4.0.css Unable to open asset URL: file:///android_asset/mathscribe/jqmath-etc-0.4.2.min.js Unable to open asset URL: file:///android_asset/mathscribe/jquery-1.4.3.min.js
I think the problem might be that I need to download some jqMath files to my Android assets folder, but I'm not sure where to find these files.