I would also like to deploy my mobile application to the desktop, did you figure out how to do it?
I have come up will a solution but it is not that quick to implement as there seems to be no automated migration route. I had to go and learn about 'classic' air apps and create one. I then used the air viewstack concept to replace the views in my mobile app. Essentially I ended up with a header panel with a set of views on a stack below this that corresponds to the action bar and views in the mobile app.
Points to note: If you want the run the app at about the same physical size as on you phone you with have to reduce the window size of you air app compared with the phone as the pixel density is greater on the phone. For graphics to render nicely this will mean some managed scaling of images.
Hope this is useful
Yes, your experience is very helpful.
I was hoping to be able to just 'package' the moble.swf as an air app and deploy. When I was first learing about Mobile develpement in Flash I had been using a .bat file downloaded from some Adobe resource 'packageApplication.bat' that I would run after compiling my application out to a .swf and it would then take that .swf and create two deployments, one for AIR and one for Android.
Now that I am using Flash Builder Hero and Buritto I have all this packaging going on for me by the IDE. So I have been trying today to simply use my old 'packageApplication.bat' to do the same for my Hero mobile application. It KINDA works, being that I can take my moble applications .swf and package an AIR application(.air) and a mobile application (.apk). The .apk packaged works fine manualy installed to a mobile device, however the .air installs but does not launch when executed... nothing happens, seems to exit right away.
Did you ever try this aproach? Do you know why it is not working?
1 person found this helpful
I was able to complile and deploy my Android app using command line air/android packaging and adding required air swc's to my project. I used the following packageApplication.bat(downloaded from livedocs) to package my MobileApplication as both an air app and android:
:: AIR application packaging
:: More information:
:: http://livedocs.adobe.com/flex/3/html/h ... ml#1035959
:: Path to Flex SDK and ANDROID binaries
set PATH=%PATH%;C:\Program Files (x86)\Adobe\Adobe Flash Builder Burrito\sdks\4.5.0\bin;C:\Program Files (x86)\Adobe\Adobe Flash Builder Burrito\jre\bin
:: commented set PATH=%PATH%;C:\PATH_TO_YOUR_ANDROID_SDK\android-sdk-windows\tools
echo PATH Set to %PATH%
:: Signature (see 'CreateCertificate.bat')
set SIGNING_OPTIONS=-storetype pkcs12 -keystore %CERTIFICATE%
if not exist %CERTIFICATE% goto certificate
echo CERTIFICATE_FILE: %CERTIFICATE%
:: Output AIR
if not exist air md air
echo AIR_FILE: %AIR_FILE%
:: Output APK
if not exist apk md apk
echo APK_FILE: %APK_FILE%
set FILE_OR_DIR=FlashClientMobile.swf assets
echo APP_XML: %APP_XML%
echo FILE_OR_DIR: %FILE_OR_DIR%
:: MEecho Signing AIR setup using certificate %CERTIFICATE%.
echo AIR COMMAND adt -package %SIGNING_OPTIONS% %AIR_FILE% %APP_XML% %FILE_OR_DIR%
call adt -package %SIGNING_OPTIONS% %AIR_FILE% %APP_XML% %FILE_OR_DIR%
if errorlevel 1 goto failed
:: echo AIR setup created: %AIR_FILE%
echo Signing APK setup using certificate %CERTIFICATE%.
call adt -package -target apk %SIGNING_OPTIONS% %APK_FILE% %APP_XML% %FILE_OR_DIR%
if errorlevel 1 goto failed2
echo APK setup created: %APK_FILE%
:: APK INSTALL
echo Installing package... %APK_FILE%
call adb install %APK_FILE%
if errorlevel 1 goto failed2
echo Android setup installed: %APK_FILE%
echo Certificate not found: %CERTIFICATE%
echo A certificate is required, generate one using 'CreateCertificate.bat'
echo AIR setup creation FAILED.
echo did you configure the Flex SDK path in this Batch file?
echo Android install FAILED.
//END BATCH FILE
I then did a diff between a Flex Buritto Moblie/AIR project library swc's included and identified swc included in AIR and missing in mobile. I updated the project libraries by adding the following swc's:
Then performed a clean build and ran packageApplication from my bin-debug dir and was successfully able to install and run the mobile application on the desktop :-).
Being new to supporting mobile phones, tablets, TV screens along with our web and desktop clients I am not yet sure how we will structure our projects and get maximum code reuse and UI consistancy across these form factors. I have already created a common library project containing all remote stubs, value objects and common utilities and am still trying to figure out how much mileage I can get out of my mobile views. I like the View Navigator and ActionBar navigation on all screens we support and am thinking to extend the ViewNavigator and add additional states along with the 'portrait' and 'landscape' currently offered, like 'portraitPhone', 'portraitTablet', 'portraitTV', 'portraitPC' and leverage my existing mobile views to use these states to adjust the UI layout to accomodate the new realestate... but still learning...
Hope that helps!
Thanks very much for taking the trouble to write up the solution. I haven't had time to try it as I have been too busy recreating the app manually. I don't mind too much doing this as I think the existing app renders to large on the screen. So I have been scaling this down as well.
Have also just posted a problem concerning passing parameters from a spark list to a new view. I think it must be easy as it is a very common requirement and is a piece of cake in flex mobile. Grateful if you could take a look.