port of https://github.com/LIFX/lifx-sdk-android