Splash
Splash

Reputation: 181

Sony Camera Remote API - Flash Mode

I'm trying to set the "Flash Mode" using the Sony Camera Remote API.

The camera I'm using is DSC-RX100M3.

Since the current (Beta) version of the Android API doesn't contain this method, I had to add it:

public JSONObject setFlashMode(String strMode) throws IOException {
    String service = "camera";

    try {
        JSONObject requestJson = new JSONObject()
                .put("method", "setFlashMode")
                .put("params", new JSONArray().put(strMode))
                .put("id", id())
                .put("version", "1.0");
        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);
    }
}

The problem is, I get a 403 (Forbidden) error from the camera. What does this mean?

The API document states that this camera model support setting the Flash Mode, which makes sense, since I'm not getting a 501 (Not Implemented) error.

Thanks.

Upvotes: 0

Views: 396

Answers (1)

Prem SONY
Prem SONY

Reputation: 287

Please make sure latest version of the 'Smart Remote Control' application is installed in the camera.

Upvotes: 2

Related Questions