When you read that you can reuse B4X code for both android and iOs it is correct. The code (source) can be reused in all three platforms (B4A, B4I, B4J) sometimes with some minor modifications.Hello DonManfred,
To ensure I am fully understanding this, it sounds like the Android Java code I have for the business logic part of the program, will have to be rewritten from scratch.
Is that correct ?
So if I am wanting to build an iPhone app in that case I can either do it using Swift 4 for example in the Apple world of Xcode, or I can do it in B4i. But either way I am going to have to rewrite all that Android Java code over again in whatever platform is chosen. Correct ?
When you read that you can reuse B4X code for both android and iOs it is correct. The code (source) can be reused in all three platforms (B4A, B4I, B4J) sometimes with some minor modifications.
What is not correct is how you understood the sentence.
Jar is not source code, but is compiled in bytecode. The code already compiled cannot be shared because it has already been translated (or rather compiled) for the specific platform and will work on that platform.
Source code in java is not the same as B4X source code. Java runs on many platforms but not iOs. All the java code or the compiled jar will not work on ios.
But if you have written a code in B4X, thanks to the B4X IDE, you can compile it to run on Android, iOs and Desktop (Windows, Linux, Mac)
It is a few things yes, hardware binding, and just a lot of logic.If you have the source in Java you can try to translate it manually into b4x.
Is it a code that binds particular to APIs, services or specific hardware?
What does this code do?
But unfortunately it is your only option. There is no tool that can transpile java to c++/obj-c automatically preserving everything. A complete set of different APIs is used to control the hardware for example. That is the advantage of writing it in B4X, where B4X will take care of using the correct API depending on the platform on compilation for you.Manually translating is not really an option