Android native, can I use it?

Monkey Targets Forums/Android/Android native, can I use it?

Xaron(Posted 2015) [#1]
Hey there,

can I use the C++ Android target instead of the plain Java one? Is this a viable option?

Cheers!


skid(Posted 2015) [#2]
I don't think it is available, the 3 android targets that are included in 83b are all java based targets.


dawlane(Posted 2015) [#3]
From what I have read on the use of native C++ compiling, they tend to be against it. The main reason is that it limits the number of devices that the code will run on (different CPU architectures). The other is that native compiled code may not be any faster than the JVM JIT compiled code and in some cases may be even worse.

There hasn't been much talk if any about the use of the NDK with Monkey, but if I was to have a guess. You could write your C++ routines and bind them to Monkey as you would with the desktop targets. That is if Mark has implemented the NDK tool chain into trans . The best person to ask really would be Mark.


Sammy(Posted 2015) [#4]
Having used C++ with the NDK, I can tell you it's a lot faster with computational applications, like physics. Also an Android APK can hold more than one CPU dependant native compilation, so a range of CPUs can easily be catered for. The NDK was a planned Monkey feature addition by Mark, together with Shaders a couple of years back but I assume he has canceled those additions now.