Dear all,
I'm trying to use a Javascript library (Tune.js) in a WebView using WebViewExtras.
First question: how can I include the .js files in the app, so that the .html file loads it ?
After various attempts, I load the .js scripts in a string and build the .html document "on the fly". But this also did not work.
The produced file works in a browser, but not in the WebView. I get errors like:
You find the project in the attachment.
Any help would be appreciated !
Take care,
Sergio
I'm trying to use a Javascript library (Tune.js) in a WebView using WebViewExtras.
First question: how can I include the .js files in the app, so that the .html file loads it ?
After various attempts, I load the .js scripts in a string and build the .html document "on the fly". But this also did not work.
The produced file works in a browser, but not in the WebView. I get errors like:
B4X:
Uncaught SyntaxError: Unexpected token { in https://tonejs.github.io/build/Tone.js (Line: 1)
Uncaught ReferenceError: Tone is not defined in file:/// (Line: 5)
Uncaught ReferenceError: synth is not defined in (Line: 1)
You find the project in the attachment.
Any help would be appreciated !
Take care,
Sergio