Refactor out the Java casting code

When we return JSON to the Java side it does not have the proper methods such as Contact.save() so we need to cast the JSON to the correct JS object. This used to be done from the Java layer calling the right method to cast the JSON. In this new approach the JavaScript layer will no what needs to be cast and call it's own internal function to do the cast.
This commit is contained in:
macdonst
2012-02-08 14:12:06 -05:00
parent 77547f8826
commit 9aa1cd756a
12 changed files with 260 additions and 187 deletions
@@ -31,14 +31,6 @@ public class PluginResult extends org.apache.cordova.api.PluginResult {
super(status, message);
}
public PluginResult(Status status, JSONArray message, String cast) {
super(status, message, cast);
}
public PluginResult(Status status, JSONObject message, String cast) {
super(status, message, cast);
}
public PluginResult(Status status, JSONArray message) {
super(status, message);
}