A simple Accelerometer application with Java 11+, JavaFX 15+ and GraalVM.
Read about this sample here
We use Gluon Client to build a native image for platforms including desktop, android and iOS. Please follow the Gluon Client prerequisites as stated here.
[No accelerometer on desktop, but you can test the UI using mouse press on ball at beginning, then mouse drag to guide the ball through the maze.]
Run the application using:
mvn javafx:run
Build a native image using:
mvn client:build
Run the native image app:
mvn client:run
Build a native image for Android using:
mvn client:build -Pandroid
Package the native image as an 'apk' file:
mvn client:package -Pandroid
Install it on a connected android device:
mvn client:install -Pandroid
Run the installed app on a connected android device:
mvn client:run -Pandroid
Build a native image for iOS using:
mvn client:build -Pios
Install and run the native image on a connected iOS device:
mvn client:run -Pios
Create an IPA file (for submission to TestFlight or App Store):
mvn client:package -Pios