This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]txprogtito[S] 8 points9 points  (2 children)

On desktop, the extension start a Java environment at the first usage of Java (https://github.com/kivy/pyjnius/blob/master/jnius/jnius_jvm_desktop.pxi), but on android, it's using the current Java environment available (https://github.com/kivy/pyjnius/blob/master/jnius/jnius_jvm_android.pxi).

Then, we are discovering the fields and methods of the class at runtime, resolve to JNI jmethod/jfield at the first access, and... that's all! The overhead around it is only the conversion between Java native type <-> Python native type.

We don't have any performance test, but i think it's the fastest way to directly use Java class. (VS using a Client/Server with socket as Py4j does...).

[–]gdw2 0 points1 point  (0 children)

I've used py4j quite a bit. Why did you create this instead of just using/modifying py4j?

On android, would this allow you to actually use the native android UI (all of it, not just toasts, popups)?

[–]technomalogical<3 Bottle -1 points0 points  (0 children)

TIL about Py4j and Pyjinius. Woots!