Re: hacking desktop externals for mobile
Posted: Wed Jun 05, 2013 10:15 pm
Well... I'm not experienced with JNI so I can't comment on that but I am definitely looking forward to Java externals 
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
Yup - for pure C externals not requiring access to Java, you can just mutatis-mutandis the revxml Android.mk. The standalone builder is setup for custom externals (although I'm not sure how well tested it is!). The structure of the lcext zips are designed so iOS and Android components can sit side-by-side - just put the resulting .so into the lcext zip at Android/External-armeabi. (The code that extracts stuff is addExternalFromFile in stack revsaveasandroidstandalone).Actually if you look at the Android.mk files its the same... So if we just want C it's not complicated... Not sure if the standalone builder is setup for that though.
The array implementation is complete I think (although probably not very well tested) - the reason it has been pending for so long is that I wanted to ensure that the API was implementable via the new abstract types in the refactor branch (the calls exported as the 'externalv1' interface are *not* compatible - hence the wrappers that get compiled into externals, as long as we can keep the LC APIs compatible with how the engine types are going to work, when we get the new Extensions API current externals just need to be recompiled against a shim). I've added this to my list to finally double-check - if the API checks out then there's no reason I can't see for it not to be usable.What I'd really like in the way of arrays is support for multidimensional arrays.
The current (pending) Android external implementation was essentially intended as a way to implement native code externals that could call Java - so lcidlc can generate wrappers in both directions - so native code can easily call Java, and that Java can call native code. I've also added this to my list to review - at least I can write up what work has been done so any interested parties can take it and run with it as a baseline if they want.sounds good... Is it more work though than having the lcidl parser generate the JNI calls for us (which I think was the plan based on the code I've seen)... my understanding is lcidl will be upgraded to open language in due course...
Indeed, it turns out it is very close, and Jan's thoughts made me realize it wasn't too far from 'pure Java' externals on Android toof you look at the lcidl stuff you will see that it generates the JNI calls for android already. I think it's all fairly close...
Code: Select all
java command rreMicrophoneStartRecording
in filename as c-string
return recording-status-enum
Yup - multi-dimensional and are (I think) now suitably complete and forward-compatible.The array support in lcidl externals is ifdefed out but it is multi-dimensional I think.
Oh, all right.Your message contains 3 characters. The minimum number of characters you need to enter is 10.
You okay there @mwieder?!!!
Well, thank @Janschenkel for triggering an 'ah ha!' moment the other day.Got excited, but I guess I didn't get excited enough for the forum validator...