View unanswered posts | View active topics



Reply to topic  [ 5 posts ] 
AIR 3.0 native extensions 
Author Message
Member

Joined: Mon Apr 14, 2008 12:41 pm
Posts: 13
Reply with quote
In case anyone is wondering, I took some notes of what I did when trying to compile an example AIR Native Extension using FlashDevelop 4 RC1 - a bit raw, but hopefully it might help someone. There is a growing collection of community extensions to be found here: http://extensionsforair.com/

1. Download AIR 3 sdk and flex 4.5.1 sdk and merge them.
2. Download and install AIR 3.0 runtime on target platform!
3. Download extension example from http://www.adobe.com/devnet/air/native- ... r-air.html I went for the Vibration as my phone doesn't support gyroscope.
4. Create new Air Mobile as3 project in Flashdevelop 4 RC1
5. copy contents of ReadyToUseExtension from the zip file into /lib
6. Right click on swc β†’ add to library, then right click again, options β†’ external library.
7. Change build target to air 3 (using the merged flex and air sdks)
8. edit Run.bat to go to android-debug
9. create certificate in /bat
10. add extension to application.xml like this <extensions><extensionID>com.adobe.Vibration</extensionID></extensions>. Or through air properties gui. Use the id specified in the text file in lib.
11. remove bin/icons
12. change <application xmlns="http://ns.adobe.com/air/application/2.7"> to <application xmlns="http://ns.adobe.com/air/application/3.0"> in application.xml
13. add β€œ-extdir lib” to the end of the adt line in /bat/Packager.bat (line 44)
14. plug in android phone in usb debug mode
15. add <uses-permission android:name="android.permission.VIBRATE"/> to the android manifest in application.xml (otherwise it'll all compile but won't actually vibrate.)
16. test project on android phone down the wire.


Thu Oct 06, 2011 8:27 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Thanks for the tip!


Fri Oct 07, 2011 12:06 pm
Profile WWW
Member

Joined: Fri Jan 20, 2012 2:56 pm
Posts: 23
Reply with quote
THANK YOU! works also with iOS .
Tried a lot of thinks before I found your post.

The only bad thing is, that I can't test it on Desktop now (maybe because the ANE doesn't support this).

It would be good to tell FD not to use the ANE when testing on desktop. It this possible?


Thu Apr 26, 2012 10:14 am
Profile
Member

Joined: Mon Oct 08, 2012 4:40 am
Posts: 2
Reply with quote
http://lilili87222.github.com/admob-for-flash/

cool native extension to load admob advertising in iphone application.
all type of banner ad and full screen ad available i have test


Mon Oct 08, 2012 4:53 am
Profile
Member

Joined: Fri Nov 30, 2012 6:33 am
Posts: 1
Reply with quote
dex wrote:
THANK YOU! works also with iOS .
Tried a lot of thinks before I found your post.

The only bad thing is, that I can't test it on Desktop now (maybe because the ANE doesn't support this).

It would be good to tell FD not to use the ANE when testing on desktop. It this possible?


(yeah, this post is old, but just in case someone is snooping from google, i'll answer anyway)

I had to use a separate custom application.xml for mobile and desktop for that. I copied the original application.xml to a new xml, in my case, application_mobile.xml

Instead of putting the <extensions><extensionID>com.adobe.Vibration</extensionID></extensions> in application.xml, put it in the application_mobile.xml instead (this also goes for <application xmlns... bit as well), then edit the Packager.bat to use the new application xml instead of the desktop version. i.e.
Code:
::inside Packager.bat, starting at line 9

:android-config
set CERT_FILE=%AND_CERT_FILE%
set SIGNING_OPTIONS=%AND_SIGNING_OPTIONS%
set ICONS=%AND_ICONS%
set DIST_EXT=apk
set TYPE=apk
::use a different application xml -----------------
set APP_XML=application_mobile.xml
::-------------------------------------------------
goto start

:ios-config
set CERT_FILE=%IOS_DEV_CERT_FILE%
set SIGNING_OPTIONS=%IOS_DEV_SIGNING_OPTIONS%
set ICONS=%IOS_ICONS%
set DIST_EXT=ipa
set TYPE=ipa
::use a different application xml -----------------
set APP_XML=application_mobile.xml
::-------------------------------------------------
goto start

:ios-dist-config
set CERT_FILE=%IOS_DIST_CERT_FILE%
set SIGNING_OPTIONS=%IOS_DIST_SIGNING_OPTIONS%
set ICONS=%IOS_ICONS%
set DIST_EXT=ipa
set TYPE=ipa
::use a different application xml -----------------
set APP_XML=application_mobile.xml
::-------------------------------------------------
goto start


I haven't found an easier way, though I would like to know if there is.


Fri Nov 30, 2012 7:23 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.