Eugen
Eugen

Reputation: 1543

Can I use javax.script in Android development and if yes how?

I'm having a bit of trouble with including javax.script.*; in an Android project. I need it so I can use the "eval" function in JavaScript, in order to parse arithmetic functions efficiently, without building a parser myself (I have utterly no experience in that and not a lot of time on my hands).

Is there any chance to use JavaScript or the "eval" function or something similar in my Android app?

Thanks for any info you can give me

Upvotes: 6

Views: 2180

Answers (2)

Sarel Botha
Sarel Botha

Reputation: 12700

Try JEXL. It should do what you need but is simpler than the entire Javascript interpreter.

Upvotes: 2

Changwei Yao
Changwei Yao

Reputation: 13101

Execute the JS code with webview

Upvotes: 4

Related Questions