PhilipsHue / HueSDK

Philips Hue Software Development Kit
99 stars 39 forks source link

.getStringValue(); is not a valid method, unable to obtain new resouce IDs per API documentation #33

Closed danzada1 closed 6 years ago

danzada1 commented 6 years ago

The "getStringValue()" in String identifier = responses.get(0).getStringValue(); method shown below is not available to me in Android Studio or my version of Java (not sure). What should I do in order to retrieve the newly created resource ID? Thanks!!!

`bridge.createResource(scene, BridgeConnectionType.LOCAL, new BridgeResponseCallback() {

@Override
public void handleCallback(Bridge bridge, ReturnCode returnCode, List responses, List errors) {

    if (returnCode == ReturnCode.SUCCESS) {

        // Identifier of the created resource

        String identifier = responses.get(0).getStringValue();

        // ...

    } else {

        // ...

    }

}

)};`

Going off the examples shown here: https://developers.meethue.com/documentation/hue-sdk-guide-java

jhvdb87 commented 6 years ago

This is a mistake in our documentation, try List<ClipResponse> responses, List<HueError> errors instead.

danzada1 commented 6 years ago

Thanks this works!