Gluon Mobile 4.0.0 is now available

The entire Gluon team is immensely proud to announce the immediate availability of Gluon Mobile 4.0.0, the best solution for building cross-device mobile applications in pure Java, with zero native or platform-specific coding. The primary focus for Gluon Mobile 4.0.0 was to overhaul our low-level Gluon Charm Down library that provides a single API for accessing hardware and software services on mobile devices, without needing to write any platform specific code. These improvements increase the number of services we offer, and also make it trivial for third-parties to create and consume additional services that do not come available as part of the base distribution. On top of this, all other layers of Gluon Mobile received numerous improvements and bug fixes, which we will detail below.

Upgrading to Gluon Mobile 4.0.0

For all users of the Gluon Mobile solution, we have created a migration guide to help you work through the process. If you have any questions that are not answered there, we recommend that you in the first instance consult our support page, and in particular the Stack Overflow link. If you can not find an answer there (or are not keen to ask a question there), then please reach out to us via email.


Gluon Mobile is a full client-side solution for writing high performance, cross-device mobile applications purely in the Java programming language. Because there are many layers to the Gluon Mobile stack, we will work through the improvements to this release from the lowest level to the highest. In this order, we will work through JavaFXPorts, the jfxmobile plugin, Gluon Charm Down, Glisten, Gluon Connect, and the IDE plugins. Don’t worry if these names aren’t familiar to you, they all form sub-components in Gluon Mobile, and we will introduce them one by one as we talk about the improvements in Gluon Mobile 4.0.0.

As a reference, we’ll list the sub-components and their versions Gluon Mobile 4.0.0 makes use of here:

Sub-component Version
JavaFXPorts 8.60.8
jfxmobile-plugin 1.1.0
Gluon Connect 1.1.0
Charm Down 3.0.0
Charm Glisten 4.0.0


amber_devices_2JavaFXPorts is the Gluon-developed port of JavaFX to work on mobile platforms, including a number of performance and functionality tweaks to ensure the best experience when Gluon Mobile is used on mobile devices. JavaFXPorts continues to receive performance and bug fixes, as well as functionality improvements. Most notable in this release of Gluon Mobile are the following changes:

  • Significantly improved text kerning – the design team at Gluon have been very vocal that text kerning wasn’t great, and after much investigation and studying of cross-platform text kerning, we have now resolved this issue and text looks vastly better because of it.
  • Performance optimizations related to minimizing the frequency with which JavaFX CSS is applied at runtime.
  • Improved scrollbars – they now fade in and out appropriately, and do not take up any space – they exist above the content.
  • Support for protocol dispatchers in the native iOS web layer.
  • Improved native keyboard support.
  • Ability to pass intent parameters as Java arguments.

jfxmobile Plugin

As noted in the Gluon Mobile 4.0.0 migration guide, the jfxmobile plugin has been updated to version 1.1.0. There were a few primary motivators for this release of jfxmobile:

  • Improved support for Gluon Charm Down, in terms of creating the minimal build for the target platform. We will give more detail about these changes as part of the Gluon Charm Down discussion below.
  • Improved usage of Retrolambda, which is now applied to all dependencies of the androidRuntime gradle configuration, whereas in previous releases Retrolambda was only applied to the compiled sources of the project.
  • Support for iOS 10 is now fully enabled in jfxmobile.

Gluon Charm Down

G_Grey_charm_opaqueAs already mentioned, Gluon Charm Down is our open-source library for accessing native services such as GPS, accelerometer, notifications, etc in a cross-platform, single API manner. This means regardless of platform you always write the same code, and there is no need to check what device your code is running on. Gluon Charm Down was the primary driver for Gluon Mobile 4.0.0 and received a complete overhaul of API, a total overhaul of the packaging approach, and the simplification of third-party plugin development (and we hope third party developers will consider contributing their plugins back to the Gluon Charm Down project for the benefit of other users!).

Feedback from users of earlier releases of Gluon Mobile was that it was a nuisance that our Gluon Charm Down releases were ‘per-platform’. What they meant by this was that we required developers who wanted to use Gluon Charm Down in their projects to include all Java and native code for their chosen platforms along with their code. This meant that if a developer simply wanted to use the accelerometer functionality, they would end up bringing in Java and native code for all services for that particular platform (e.g. Android or iOS). This had the unfortunate consequences of increased project size, and in terms of app store submission, it was seen as a negative as their project required far more native services (due to their dependency on Gluon Charm Down) than necessary (and this could in theory lead to rejection from some app stores).

Starting with Gluon Mobile 4.0.0, this is no longer the case. We ship a core project, and then (at present) 21 plugins (which are listed below). The core project knows how to load plugins (from Gluon Charm Down or from third-parties). At compile time, it is simply a requirement that you now list the plugins that your project uses, for example:

jfxmobile {
    downConfig {
        version '3.0.0'
        plugins 'accelerometer', 'compass'

The code above will then ensure that at compile time only the accelerometer and compass services are compiled in to the resulting binaries (and all other services are not!), and of course that for iOS builds only iOS-related code is included, on Android only Android-related code is included, etc.

On top of this API and tooling overhaul, our engineering team developed a large number of new plugins for Gluon Charm Down. It is not possible to talk about them all in depth, but below is a table of all of the plugins that are now offered as part of Gluon Charm Down, along with a link to the Javadoc documentation for each of these services:

Service Name Description Docs
Accelerometer Interface for querying the status of the accelerometer of the underlying device. Gives readings on x, y, and z axis. JavaDoc
Barcode Scan Provides the ability to scan a barcode (or similar, such as a QR code), and retrieve the value represented by that barcode as a string. JavaDoc
Battery Interface for querying the status of the battery on the underlying device, including the current battery level, as well as whether the device is plugged in or not. JavaDoc
Bluetooth Low Energy Interface to Bluetooth Low Energy (Bluetooth Smart) functionality (e.g. beacons). JavaDoc
Browser Attempts to launch the platform default web browser with the given URL. JavaDoc
Cache Provides an API to weakly cache objects in memory for future use. There is no guarantee that items in the cache will be retained for any minimum period of time – they will be GC’d as necessary. JavaDoc
Camera Picture A service that allows for a picture to be returned to the caller, where the picture may be retrieved from the local file system, or an attached camera. JavaDoc
Compass Interface for querying the status of the compass of the underlying device. The compass reading is represented as a value between 0 and 359.99, where 0 is north. JavaDoc
Connectivity Determines whether there is network connectivity available on the current device, through any means (i.e. WiFi or cell phone data networks). JavaDoc
Device Interface for querying the device hardware and software. JavaDoc
Display Display service reports details of the devices display such as resolution, and whether this is a mobile, tablet, or desktop display. JavaDoc
Geolocation (GPS) The Position service provides details about a device’s current location on earth. JavaDoc
Lifecycle The life cycle service allows for developers to listen to events related to when their software is paused and resumed , as well as initiate proper shutdowns of their software, regardless of platform. JavaDoc
Magnetometer Interface for querying the status of the magnetometer of the underlying device. JavaDoc
Notifications Used to schedule a native notification. JavaDoc
Orientation A service to determine the orientation of the device on platforms where this information is available (i.e. iOS and Android). JavaDoc
Phone Attempts to use the platform default dialer to make a phone call to the given phone number. JavaDoc
Settings The Setting service provides a simple way for storing, removing and retrieving key-value pairs of strings. JavaDoc
Status Bar Service allowing for access to the status bar on platforms where such a feature exists (i.e. iOS and Android). JavaDoc
Storage Service to provide access to the storage facilities offered by the native platform. JavaDoc
Vibration Interface for accessing the vibration functionality present on most mobile devices. This allows for alerting the user to events when sound is inappropriate or unavailable. JavaDoc


G_Grey_charm_opaqueAfter Gluon Charm Down, Glisten, the application framework and UI toolkit layer of Gluon Mobile received the next highest amount of development in Gluon Mobile 4.0.0. It is not possible to talk in any depth about the numerous changes, but some of the stand out improvements include:

  • New controls: BottomNavigation and ExpansionPanel.
  • Support for specifying a splash view to display at app startup. This is a full JavaFX view, so it can have any functionality desired (and can remain as long as needed). For a splash screen that displays even earlier, both Android and iOS have support for native splash screens that can also be used.
  • Updated to the latest Material Design glyph font, and updated the enum to make these available to apps.
  • Floating action button improvements – support for different sizes, ‘sibling’ buttons, support for anchoring to an arbitrary node, and simpler visibility toggling.
  • NavigationDrawer selection improvements.
  • ListTile supports line wrapping
  • Visual improvements to TextArea, Dialogs, Toasts, CardPane
  • Improved JavaDocs
  • Improved memory management for layers – they are now more aggressively removed from the scene when hidden.

Gluon Connect

Gluon ConnectGluon Connect is our client-side library for connecting to remote web services and Gluon CloudLink, and was updated to version 1.1.0 in the Gluon Mobile 4.0.0 release. There were again a number of improvements, including:

  • Better support of the JavaFX application thread – ObservableList instances are now updated properly.
  • Support for setting HTTP headers.
  • Fix for stack overflow when removing items from remote observable lists.
  • Improved SSE handling.
  • Improved security when connecting to Gluon CloudLink.

IDE Plugins

The IDE plugins have all been updated to work with the latest features in Gluon Mobile. Most importantly, the pre-built templates for Gluon Mobile applications have been updated to use the latest best practices suggested by Gluon Mobile.


Gluon Mobile 4.0.0 is a massive release – our engineering team has been working incredibly hard on Gluon Mobile, and the results show in releases like this. The other half of the Gluon engineering team is working on the server-side Gluon CloudLink offering, and together we are building an end-to-end solution for Java mobile software. As recently announced, Gluon CloudLink has evolved to be a fully-fledged MBaaS offering, and Gluon is firing on all cylinders to bring the very best Java on mobile experience for developers and end users. With Gluon VM coming up soon, we have a huge amount of engineering ahead of us, but our team is populated with the very highest of talent, and we look forward to continuing to blow our customers and end-users away with what we have now, and what we have in store next.

If you haven’t yet started to use Gluon Mobile, try it out today for free. If you want to learn more, the GluonHQ web team have Gluon Mobile details online, as well as our developer documentation and samples. If you have any questions, review the available options for support on our support page. If you’re convinced that Gluon Mobile is the right solution for your apps, you can buy developer licenses directly from this website.

Strap yourselves in – Gluon is only just getting started.