I am using following MathJax app code. http://cs.jsu.edu/wordpress/?p=498#comment-217
In following function i am trying to load file from asset directory.
You have to replace all the lines loadUrl(...)
with evaluateJavascript(...)
. But this is only for KitKat (API 19 or above), so you need to do an SDK version check first:
if (android.os.Build.VERSION.SDK_INT < 19) {
mWebView.loadUrl("javascript:MathJax.Hub.Queue(['Typeset',MathJax.Hub]);");
} else {
mWebView.evaluateJavascript("javascript:MathJax.Hub.Queue(['Typeset',MathJax.Hub]);",null);
}