i want to write a scientific/numeric environment for android, i am collecting informations since i never developed anything for android or mobile.
I’ve recently heard about the native development kit, which should allow me to write C++ code for my android app, but i have some questions:
- Would it bring portability issues? due to compiling and code machine hell
- Are basic java mathematical functions and objects good (at least in android) or should i try for a custom implementation of common functions?
- Writing everything in java? would it bring me lot of performance loss if compared to ndk?
From the website:
So the good news is, no portability issues! The bad news is, it’s not the same as compiling C++ code for the processor, so it might not give you the performance boost you’re looking for. Moreover, it will definitely make your task as a developer much harder.
To reiterate the advice you received in the comments: Get the functionality with pure Java first, then worry about optimizing later.
Regarding "how good" the math objects are, the functions in java.lang.Math are as good as you can do with
doubles.It appears that the arbitrary-precision decimal and integer classes aren’t in the android libraries, so you would have to write those yourself if you need them. The same goes for any higher-level objects (vectors (could use an
ArrayListactually), matrices, graphs) Java does have aSetif you need that.