Hacker News new | ask | show | jobs
by invalidname 1405 days ago
This works through JNI. It will work fine as long as you don't use Java/Kotlin stuff. Then you will need to traverse back into the running VM. That has a serious overhead of going in/out of the VM. Since the Android UI is built in Java C code that tries to work with it is slower.

Notice that this isn't true for games which interact with the hardware directly in C. Only for high level UI stuff.

1 comments

Sure. My point is, the hardware is not directly executing Java bytecode, so I don't think I would say Java is native to Android in the traditional sense of the word. Google themselves make the distinction between Java code and native code.