Is it possible to use ANEs with a Haxe compiled SWF? I’m compiling an APK using the latest AIR SDK without ANEs and it works perfectly fine, however, when I include an ANE, it stops working. Specifically, the app opens with a blank screen with no output to the Android monitor.
The log shows the app intent starts and I get the adobe SDK build num: I/__BUILD_NO(2806): #188.8.131.52
I’ve added a trace as the first line in the main function, but no output when an ANE is present.
Is there anything special I need to do?
- Extension id is added to air app.xml
- Correct android permissions are set
- AIR compiler is correctly path’d to ANE folder. (It complains when I don’t set it correctly)
- ADL launches correctly with access to the extracted ANEs
- I’ve attempted to include the ANE library.swf into the Haxe compile (doesn’t help)
Any help would be greatly appreciated.
Weird, I’m not sure, perhaps there is “magic” they do to the SWF in order to allow ANEs to function, or perhaps it’s just a missing init call of some kind?
Ok, so this is weird one. I found this article: http://www.blackgoat.de/?p=206 - which illustrates that it can be done quite easily. I took that made it into an OpenFL app and run into the same issue. Here’s what I found:
When ANEs are included:
- Trace doesn’t work. logcat doesn’t catch anything. Even tried using
- Exceptions don’t output anything. Might be related to trace not working.
- Debug builds tend not to work. Release builds works, but with above mentioned quirks.
Luckily I use my own macro logger which I can swap out for different implementations. While using my text file logger, I could deduce the above. It’s not ideal, but I can manage for now. The major issue is that exceptions are quite, makes it near impossible to fine where things are going wrong.
I tried many different combinations of compiler arguments for haxe, openfl and AIR. Basically, nothing makes a difference.
I think the AIR compiler is to blame here.
I finally revisited this. I found that enabling the haxedef ‘fdb’ fixes the problem. Just to provide closure to this topic.