I have API 1.1 on my SONY camera. I switched to "Contents Transfer" mode, then I call deleteContent, and tried it many times (in a while-loop), but every time I get a "Not Available Now" response. I tested it with the CameraRemoteSampleApp and created this function in SimpleRemoteApi.java. I checked my generated JSON but this seems all right:
public JSONObject deleteContent(JSONObject params) throws IOException {
String service = "avContent";
try {
//JSONObject params = new JSONObject().put("scheme", scheme);
JSONObject requestJson =
new JSONObject().put("method", "deleteContent") //
.put("params", new JSONArray().put(params)) //
.put("version", "1.1").put("id", id());
String url = findActionListUrl(service) + "/" + service;
log("Request: " + requestJson.toString());
String responseJson = SimpleHttpClient.httpPost(url, requestJson.toString());
log("Response: " + responseJson);
return new JSONObject(responseJson);
} catch (JSONException e) {
throw new IOException(e);
}
}