Copy link to clipboard
Copied
Hi, I'm currently trying to push off some time consuming tasks to an actionscript worker. This worker will in turn needs to call out to an AIR Native Extension as part of it's processing.
I've tried various combination in Flash Builder 4.7 i.e. embedded worker and external worker (with explicit packaging of the ANE in the external worker project) but alas I've been unable to get this to setup to work. I keep getting an error from the worker saying that the native extesion class could not be found (Error #1014).
Does anyone know if it is at all possible to do this or it's a limitation of Actionscript workers (loading thw swf bytes does not load up the ANE)?
Copy link to clipboard
Copied
Hi,
Which platform are you using? You might be aware but ActionScript workers API isn't supported on mobile platforms.
-Nimisha
Copy link to clipboard
Copied
Hi Nimisha,
There was some talk of ActionScript workers being made available on the mobile platform for AIR 3.6.
In our case they still do not seem to be working for Android.
When is the ActionScript workers likely to be available for Android?
- Conor
Copy link to clipboard
Copied
Hi,
Workers on Android is now available in AIR 3.9 Beta, to use the same download AIR SDK fromhttp://labs.adobe.com/downloads/air.html and to know more read release noteshttp://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air3-9_fla shplayer11-9_releasenotes.pdf.
Please share your feedback with us.
PS: It will work with -swf-version=22.
Thanks,
Nimisha
Copy link to clipboard
Copied
Hi Nimisha
I think it still got some issue there, here is what i got
FYI : i'm on winx64 test on device tab3 x86 atom with AIR13.76
source to reproduce
ANE : https://github.com/freshplanet/ANE-Alert/
Worker : http://esdot.ca/site/2012/intro-to-as3-workers-hello-world
and put both in constructor
both working but not together, simply comment
//AirAlert.getInstance().showAlert("My title", "My message", "OK", myCallback1);
is working without error throw but actaully all ane i've will throw error eventually after try to alloc ANE
weird part of this issue is only first alloc ANE will broken but other ANE alloc after that will be fine e.g.
// this one will throw error
new OtherANE();
// this one will working fine
AirAlert.getInstance().showAlert("My title", "My message", "OK", myCallback1);
in short
workaround
do tell me if you want to me to file to bug base.
ref : http://sleepydesign.blogspot.com/2014/03/ane-daily-pitfall-ane-and-worker-dont.html
Thanks
Copy link to clipboard
Copied
I confirm that I had exactly the same problem (tested before with AIR 3.9 + ANE for Android).
I posted a message here in forums.adobe without any reply from Adobe and I ended up given up (again Adobe in it's best) and ended up made one ANE that uses threads.
Copy link to clipboard
Copied
Hi
I also met the same problem---"native extesion class could not be found"
The problem is solved?
I think the reason is
" <extensions>
<extensionID>XXXXXX</extensionID>
</extensions>“ in "-app.xml"
the worker do not konw the extensionID
....
In this article :
Adobe AIR * Using native extensions for Adobe AIR
.....................
Including the ANE file in your application’s library path
To compile an application that uses a native extension, include the ANE file in your library path.
Using the ANE file with Flash Builder
If your application uses a native extension, include the ANE file for the native extension in your library path. Then you can use Flash Builder to compile your ActionScript code.
Do the following steps, which use Flash Builder 4.5.1:
Change the filename extension of the ANE file from .ane to .swc. This step is necessary so that Flash Builder can find the file.
Select Project > Properties on your Flash Builder project.
Select the Flex Build Path in the Properties dialog box.
In the Library Path tab, select Add SWC....
Browse to the SWC file and select Open.
Select OK in the Add SWC... dialog box.
The ANE file now appears in the Library Path tab in the Properties dialog box.
Expand the SWC file entry. Double-click Link Type to open the Library Path Item Options dialog box.
In the Library Path Item Options dialog box, change the Link Type to External.
Now you can compile your application using, for example, Project > Build Project.
.......................
the error will be done
Error: Error #3731: This feature is not available within this context.
at flash.external::ExtensionContext$/_createExtensionContext()
at flash.external::ExtensionContext$/createExtensionContext()
3731 | This feature is not available within this context. | This error occurs if a background worker attempts to access an API that is not available to it. |
Copy link to clipboard
Copied
Hi,
Native extensions are not supported from non-primordial workers.
-Nimisha
Copy link to clipboard
Copied
I have encountered the same problem, have you got it solved? Can you tell me the solution? Thanks