There is also a full example with sources at the following location:
http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/vibration.html

Source is in:  Vibration.zip.

HTH

Maurice 

-----Message d'origine-----
De : Maurice Amsellem [mailto:[email protected]] 
Envoyé : mercredi 12 février 2014 15:25
À : [email protected]
Objet : RE: Native Extension

Someone else had the same problem in an earlier thread ("How to avoid native 
extension execution", on 11/26/2013), so this is what I answered to him:
___________

Instead of referencing the ANE in the app descriptor, you can package your ANE 
is a separate SWC, using ADT,  that has its own deployment descriptor.

In that descriptor, you can say which  file/class is used on which platform, so 
you can set it to use a fake class on Desktop.

Example:
adt -package -target ane myextension.ane extension.xml -swc mySwc.swc -platform 
iPhone-ARM library.swf libmylib.a -platformoptions myplatformoptions.xml

OR:
adt -package -target ane Output.ane extension.xml -swc VolumeLib.swc -platform 
iPhone-ARM -C ios . -platformoptions platformoptions.xml -platform Android-ARM 
-C android . -platform default -C default

http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt5.html

The sample mobile demo "FlexGame" uses this approach:

http://www.adobe.com/devnet/flex/samples/game-of-flex-on-tablets.html

(source is available in the page).

HTH.

Maurice

-----Message d'origine-----
De : Sumudu Chinthaka [mailto:[email protected]] Envoyé : mercredi 12 février 
2014 07:30 À : [email protected] Objet : Native Extension

Hi

I have being working on a Native Extension for a Flex Mobile app and came 
across this problem

i want to have a  default implementation of the extension written in AS, so 
that i can test the app on FB imulator without any errors.but i found that  i 
could not use any Flex Framework classes in the library. please let me know how 
to use them.

what i ideally want to do is supply native extensions for Android and IOS, any 
other platform that app runs (Blackberry/Windows Emulator ) should pick up 
default AS implementation with some flex controls in it

Please let me know whether this is possible

Thanks
Sumudu

Reply via email to