Currently the NightLightApp triggers far too many events. There are possibly two reasons for this:
The color state is applied again if the location color is not an exact match. Because the compared valued are doubles and they are computed by averaging this does not match. So a comparator for hsb color values should be written and used. (has been implemented)
It seems like even after adding the observer on the service state of the location that too many events are triggered. Maybe filtering of the timestamp does not function properly for service state observer.
Currently the NightLightApp triggers far too many events. There are possibly two reasons for this:
The color state is applied again if the location color is not an exact match. Because the compared valued are doubles and they are computed by averaging this does not match. So a comparator for hsb color values should be written and used.(has been implemented)