Search code examples
airflex4swcalchemyflascc

FlasCC SWC within Mobile AIR Project


I am writing a barcode scanner for iOS and Android using Flex Mobile and ZXing. I have optimized ZXing as much as I can, but it is still too slow to use for continual scanning on some older devices. I extracted some of the heavy work into a C SWIG using FlasCC and got some pretty decent speedups during scanning. When testing on an actual device though, I get errors when starting my app. The debug console says "Mutex cannot be initialized" and crashes. Removing calls to my SWC, the app starts just fine. First of all, is using this type of SWC even possible on a mobile device? If so, what am I doing wrong? Also, the size of the generated library is pretty large (400KB+). Is there any way to reduce the size by excluding all the extra fluff?


Solution

  • While you can use FlasCC on mobile, I wouldn't recommend it: your code can run at native speeds and you have access to the OS APIs. Have you looked into Air Native Extensions?