Add Java Interpreter Support That Accepts Variables
As of now, Java function in Tasker only allows the user to define the code line by line, only with one action. We also have to handle the flow control with Tasker actions. Tasker tries to show a limited of character per action by default as well.
Thanks to all of them, the code becomes hard to read and debugging the code is not easy either since the code are branched into multiple actions.
Having a Java interpreter like BeanShell would fix them. https://beanshell.github.io/license.html
We could write full scripts in one place like with JavascriptLet action. Handling flow control and error directly, and avoid the code readability problem. It would make advanced tasks easier to build, maintain, and shareable.
However unlike Javascriptlet, it's better to accept tasker variable as part of the code, to allow dynamic control over what we can execute. Since Tasker has a lot of permission to begin with, it would be cool if we can do this since this would open an opportunity to execute anything we want remotely.
Methods to set and retrieve tasker variables may be needed as well and it's better for both to not be handled automatically like what we have with JavascriptLet.