????????monkeyrunner
??????????????????monkeyrunner????????????????????monkeyrunner???????????????????????monkeyrunner??????????????/???SDK????????????????????????? ?????????????monkeyrunner???????и????????????????Python????; ???????????????????????
????????????monkeyrunner??????
????monkeyrunner -plugin <plugin_jar> <program_filename> <program_options>
??????1??????????????
??????1 monkeyrunner??????????

????monkeyrunner???????
??????????????monkeyrunner???????API?ο???
????monkeyrunner help.py <format> <outfile>
??????Щ???????
????<???>????????????????????HTML??HTML?????
????<OUTFILE>??????????·??????????
???????monkeyrunner????
???????????????Java????????д???monkeyrunner API???????????????.jar???????????????????monkeyrunner API???????????????????е????????????????????????monkeyrunner??????
???????????????monkeyrunner??????monkeyrunner?????? -plugin <plugin_jar>????????????? ??1??
????????????????????????????????monkeyrunner?? MonkeyDevice??MonkeyImage??MonkeyRunner??com.android.monkeyrunner??????monkeyrunner API????
?????????????????????????Android SDK??????????????????com.android.app?????????monkeyrunner???豸????????·??????API?????????á?
?????ò???????
???????.jar????????????????????????????????????????????????????? MonkeyRunnerStartupRunner????.jar??????嵥?????????????????е??????????????????????????ν????????????????????????
????<jar  jarfile = "myplugin"  basedir = "${build.dir}" >
????<manifest>
????<attribute  name = "MonkeyRunnerStartupRunner"  value = "com.myapp.myplugin" />
????</manifest>
????</jar>
?????????monkeyrunner?????л???????????????? com.google.common.base.Predicate <PythonInterpreter> ?????磬???????????????????????Щ??????
package com.android.example;
import com.google.common.base.Predicate;
import org.python.util.PythonInterpreter;
public class Main implements Predicate<PythonInterpreter> {
@Override
public boolean apply(PythonInterpreter anInterpreter) {
/*
* Examples of creating and initializing variables in the monkeyrunner environment's
* namespace. During execution?? the monkeyrunner program can refer to the variables "newtest"
* and "use_emulator"
*
*/
anInterpreter.set("newtest"?? "enabled");
anInterpreter.set("use_emulator"?? 1);
return true;
}
}