Вопрос

what is the difference between executing JS with Rhino and executing with ASE(Android Scripting Environment)? Can anyone help me in this? Thanks in advance!

Code snippet executed with Rhino:

bar();
function bar() {
 var a=20; var b=30; var c = 40;
 average = (a+b+c)/3; 
out.println(average);
}

Code snippet executed with ASE(from ASE website):

load("/sdcard/com.googlecode.rhinoforandroid/extras/rhino/android.js");
var droid = new Android();
droid.makeToast("Hello, Android!");
Это было полезно?

Решение

The II option means we are executing the script in Android phone(using SL4A library). Whereas, the first option just prints the output on the console. We cannot see any output in the phone or emulator

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top