I'm trying to display some math equations in an android app, but I'm not sure how you use JqMath to display these equations. Can someone tell me step by step what to do to get the simple equations displayed in the Android app? I 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: Failed to open resource URL: file: ///android_asset/mathscribe/jqmath-0.4.0.css Failed to open resource URL: file: /// android_asset / mathscribe / jqmath-etc- 0.4.2.min.js Failed to open the resource URL: file: ///android_asset/mathscribe/jquery-1.4.3.min.js
I think the problem may be that I need to upload some jqMath files to my Android files folder, but I'm not sure where to find them.
java android jqmath
Oscar Orellana May 15 '15 at 15:49 2015-05-15 15:49
source share