これは、Java プラグインのテスト コードの一部です ( phonegap 2.7 を使用しています)。
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
try {
String[] result;
result = new String[10];
result[0] = "test1 success";
result[1] = "test2 success";
callbackContext.success(result); //error
} catch(Exception ee) {
System.out.print("ee:"+ee.getMessage());
}
return true;
}
私の質問は次のとおりです。
javascriptで配列を取得できるように、android phonegapプラグインから配列を返す方法は?
返される配列 (JSONArray?) よりも優れているデータ型はどれですか?
ありがとう