How to use JNI in cn1?

48 views
Skip to first unread message

Gareth Murfin

unread,
Jul 31, 2019, 3:33:30 AM7/31/19
to CodenameOne Discussions
I have a client who wants an Android app done, they have some stuff written in native C/NDK, so their files are .so and belong in "jniLibs" - they want me to make an app which will utilise this. Assuming I want to use this in CN1, how do I go about it? And more importantly, is it possible to use this also in the iOS version? What is the route I need to take to use this native code on both android/ios? Do I need to rewrite their c in obj-c and make a native lib for ios?

Shai Almog

unread,
Jul 31, 2019, 10:19:41 PM7/31/19
to CodenameOne Discussions
You need to package the native lib as an AAR file.

You can use the C portions in iOS without the JNI stuff. You can just call it from the native interface.
Reply all
Reply to author
Forward
0 new messages