You can already try the JavaFXPorts plugin. It is in continuous development, but the latest versions are mature enough to use it without problems.
Take a look at the basic requirements to start here . You will need the JDK8u40 +, Gradle 2.2+, Android SDK and Android Build tools.
Once you are ready, you can try samples .
I also suggest you take a look at the Gluon-plugin for NetBeans. Basically, this will create a new empty JavaFX project for you, and you can create and deploy it on your desktop, on Android and on iOS platforms.
Check out the build.gradle file:
buildscript { repositories { jcenter() } dependencies { classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b4' } } apply plugin: 'org.javafxports.jfxmobile' repositories { jcenter() } mainClassName = 'org.test.javafxports.TestJavaFX' jfxmobile { ios { forceLinkClasses = [ 'org.test.javafxports.**.*' ] } }
First of all, you just need to update the plugin version. Check here for the latter: 1.0.0-b8.
Create and run on your desktop or run tasks such as androidInstall to generate apk and deploy it on your Android mobile device.
After you have tested it and everything works correctly, you can start adding the code of your project.
And back to your question, yes, you can add any third-party bank to the project.
Basically you just need to add a dependency on the Gradle file. You can use compile or runtime with local files or from external repositories:
buildscript { repositories { jcenter() } dependencies { classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b8' } } apply plugin: 'org.javafxports.jfxmobile' repositories { jcenter() } dependencies { compile files('lib/<your local jar>.jar') compile 'org.glassfish:javax.json:1.0.4' androidCompile 'org.glassfish:javax.json:1.0.4' } mainClassName = 'org.test.javafxports.TestJavaFX' jfxmobile { ios { forceLinkClasses = [ 'org.test.javafxports.**.*' ] } }
Note that you can add dependencies that are added to only one platform, for example androidCompile or androidRuntime .
Since apk will run on Dalvik VM, only Java 7 functions are allowed. You can use lambdas, though, since the plugin uses the Retrolambda project inside your code. Keep in mind that it does not apply to added jars.
As an example of using banners in your project, you can use the open-source library Gluon-Charm-Down, which already provides access to some native services on your device, for example, local storage or GPS.
dependencies { compile 'com.gluonhq:charm-down-common:0.0.1' androidRuntime 'com.gluonhq:charm-down-android:0.0.1' desktopRuntime 'com.gluonhq:charm-down-desktop:0.0.1' }
In fact, with the jfxmobile plugin and this library, the 2048FX game was successfully ported to Android ( Google Play ) and iOS ( Apple Store ).