Just started writing my hue apps and so far the basics look good, except that lack of javadocs for some APIs makes life a little harder. So my question is how can I make the light have a blinking effect? I tried doing something like this
//pseudo code
lightState.setOn(true);
Log.e("TAG", "State for Light 2 =" + lightState.validateState());
bridge.updateLightState(light2, lightState, listener);
// Sleep thread for sometime
lightState.setOn(false);
Log.e("TAG", "State for Light 2 =" + lightState.validateState());
bridge.updateLightState(light2, lightState, listener);
so on and so forth. Is this the best way to do it? The problem is I barely see any blink. Sometimes it happens sometimes it just get dimmed. What is a best way to blink?
Thanks
In the documentation at http://www.developers.meethue.com/documentation/core-concepts it states in the "Some extra fun stuff" section that you can blink by setting the light alert state:
So use the
updateLightState
API to set the "alert" value to "select".