|
public void jsmethod_init(final UZModuleContext moduleContext){
JSONObject ret = new JSONObject();
try{
String[] devicePaths = AutoReplyPrint.CP_Port_EnumUsb_Helper.EnumUsb();
try{
if (devicePaths != null) {
for (int i = 0; i < devicePaths.length; ++i) {
ret.put("name",devicePaths[i]);
}
}
}catch (JSONException e){
e.printStackTrace();
}
}catch (Exception e){
e.printStackTrace();
}
moduleContext.success(ret,true);
} |
|