B4J Question Why does bluetooth not work in a UI app?

Mark Read

Well-Known Member
Licensed User
Longtime User
As I have already explained in this question:

https://www.b4x.com/android/forum/threads/how-to-stop-a-non-ui-app.61980/

I have a non-ui app running on a RPi, talking to a tablet via bluetooth. In order to try and solve my problem in the above question, I created a ui version of the app with a single button to exit. It didn't work!!

The bluetooth failed to start and the app crashed out with an error. The code in both apps was the same.

Why does bluetooth not work in an ui app or have I missed something?
 

Roycefer

Well-Known Member
Licensed User
Longtime User
UI app usage on the RPi is quite limited. You have to be using jdk8u6 or below and some Nodes aren't supported and there might be unexpected behavior. JavaFX isn't officially supported for ARM anymore. If your Bluetooth worked in the non-UI app but not in the UI app, I suspect it's the JavaFX that is crashing. Checking the logging output in the terminal for the stack trace will help in diagnosing the error.
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
You have to be using jdk8u6 or below

Using: C:\Programme\Java\jdk1.8.0_65\bin\javac.exe

Its not really a great problem if I can solve the other question you have also answered.
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
That's the Java version installed on your Windows computer. But on the RasPi you should have installed jdk1.8.0_6 or below to use JavaFX.
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Okay. How do I find the version on the Pi? I am using a raspian os which came with my 5" touchscreen from Makibes.
 
Upvote 0
Top