Question

I'm currently trying to find a solution to have an AIR native extension including a C - library for Android that is using JNI.

So far, I tried to pack the .so lib into a jar, which then is packaged into the ane. As I learned here, I have to unpack the .so from the .jar first in order to access it.

The code found there seems to be working for a regular android project, unfortunatly when doing this for a .jar which is then packaged into an .ane, it seems to lose scope, resulting in a

FileNotFoundException: File path/to/my/lib was not found inside JAR

I already double and triple checked all paths and the contents of my jar. It's all there and spelled correctly.

Q1: How do I get access to the .so from actionscript?

Q2: Is there any other way to package/address the .so besides the regular extension-jar into the ane?

Q3: I really don't know much about the inner working of the .ane mechanism. Is it also possible to skip the .jar-wrapping and use the .so directly from actionscript?

As always, many thanks for any input.

Was it helpful?

Solution

It becomes a bad habit of me to answer my own questions, but anyway...

Sometimes the docs can help. Here in the adobe docs I finally found the solution.

Simply copying the .so to the libs/armeabi-v7a folder in my ane package directory includes the lib into the ane, so I can use the .so from inside the java code of my extension.

Sorry for bothering.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top