Using the new Gluon Mobile framework and some hardware from Adafruit, Gerrit Grunwald describes how to create a mobile/desktop application that can be used to control a mood light that can be turned on and off, set to a particular color, or set to a color cycling mode. His goal in the article "In the Mood: Build Your Own Mood Light and Control It with Java
" is to show how easy it is to create a mobile app based on JavaFX.
The Gluon Mobile framework provides methods for achieving platform-dependent settings, which is critical when building an app for different platforms--such as mobile, embedded, and desktop devices--because the UI design is often totally different on different platforms. And, if you are building an Android app, Grundwald points out another advantage of the Gluon Mobile framework: even though Android is not capable of running Java 8, you can use Java 8 in your source code because Gluon Mobile uses retrolambda, which makes it possible to use Java 8 features (except streams) on Java 7.
Grundwald's mood light
can be hooked up to the internet and controlled remotely from different devices, such as a mobile phone and a desktop computer. And, if you don't think you need a mood light, he points out another use: you can use it as a build-server status light or for other purposes.
To see how using JavaFX on mobile devices can be a real alternative to native applications--not for all use cases, but at least for some--read the article