Showing posts with label air 2.5 mobile. Show all posts
Showing posts with label air 2.5 mobile. Show all posts

Tuesday, August 02, 2011

Video - discussing the importance of geo and mobile

This is an interview I did last year about the importance of geo-tagged data and mobile devices. It is interesting to look at these later to see how the predictions stack up against reality. In this case, it was particularly accurate. Enjoy!



Tuesday, May 31, 2011

Video Tutorial: Using Transform Gestures in Mobile Development

This is a quick video that shows the code to control zoom gestures when developing mobile applications with Flash Builder 4.5.  The source code is available if anyone wants it.  Just ping me at dnickull at adobe dot com.



Code Explained:

Line 9: The init() function is called on the viewActivate event for this example as it is a mobile application based on views.  You could queue it from other events.

Line 11:  the Variable myBC is a Spark BorderContainer.
Line 16: The BorderContainer is cast into a sprite and the event passed to the onZoom function is used to scale the sprite on the X and Y planes on lines 19 and 20.  If you want to keep the user from shrinking the sprite below a specific size, the test is done on line 17 to detect the scale.  You only need to test either X or Y and the proportions are constrained.  The best practice for most cases will be to put some sort of minimal scale on such items as it will be possible the user scales it too small and can no longer use a two finger zoom gesture.


To learn more about this topic, make sure to attend Adobe MAX 2011 in Los Angeles and register for the Hands on Mobile AIR camp I will be leading.  Registration is open now and even though we had two mega-labs last year, they both sold out very early.

I am also teaching a similar course next week at Flash and the City in New York City June 9 from 9:00 AM to 2:00 PMN local time.  There are some spaces still available.  Mobile developers are in high demand.  Increase your skills!

Monday, February 21, 2011

Duane's World #32 - more on mobile development



This video is Duane's World episode 32, the season 2 finale. It focuses on mobile development including some dives into architectural best practices.

Wednesday, December 01, 2010

Mobile Development with Flash Builder (Tutorial and Source Code)


Today I am releasing a set of two applications, one built using the Flex 4.1 SDK and one built using the Flex 4.5 SDK (Burrito version of Flash Builder using the "Hero" framework).  Although the base application is essentially the same, the differences are astounding in terms of development ease and performance. 

The project itself is a simple project to demonstrate how to read/write to a file system.  The application is named LetMeC (“let me see”).   The screenshot below is of the application built using Flash Builder 4.01 overlaid with the AIR 2.5 SDK.  This one uses the FileSystemDataGrid component and has several helper classes.  The source code for the AIR 2.5 project is available here: 

FileBrowser.fxp (Flash Builder 4.01/AIR 2.5 SDK project - 76 kb)
FileBrowser.apk (Android Package - 1.02 MB)
Installed application size = 1.02 MB (without graphics, icons, splash images etc)



This second screenshot (below) is basically the same application written using the Flash Builder 4.5 Burrito preview.  This application is open and you can use it or install it on your device:

MobileFileBrowser.fxp (Flash Builder 4.5 project - 840 kb)
MobileFileBrowser.apk (Android Package -1.78 MB)
Installed application size = 768 kb (with graphics, icons, splash images etc)



Note that the installed sizes of the applications vary.  The first one is larger even though I never used any graphics for icons, splash screens or other bits.  The Flash Builder 4.5 Burrito application has a larger installer, however on the Google Nexus 1 disk, the installed application is only 768 kb, of which roughly 398 kb is images alone coupled with 230 kb of icons!  The Hero framework rocks! Here is a screenshot.




The differences in development are vast and I am definitely favoring the direction Adobe is running towards with respect to the Hero framework.  Mobile development in Flash Builder 4.5 is much easier.  For starters, there is a notion of "views" and features such as screen orientation are supported.  The first thing you will notice is that the list of components is greatly reduced.  The version of this I built using 4.1 used the component.  This component by itself is very heavy weight (it is still MX or Halo qualified, not Spark).  The scroll bars are difficult to use as the hit area on a touch screen is very small.  Also the orientation is something you have to do manually if you want your application to resize and reorient when the phone is tilted.

One item that works well on PC, Mac, and Linux is AIR’s “openWithDefaultApplication()” method.  No such luck on Android as the architecture uses a notion of “intents”.   It is easy to write code to access the functionality rather than accessing the notion of a "file".  One line of code will open up an SMS, URL, or even phone someone.  As the code samples from James Ward illustrate below:



Last thoughts?  I am now addicted to mobile development!  Adobe Flash Builder 4.5 rocks (even though it is a preview and somewhat "beta").  The most beautiful thing is that I can use 95% of my code for a desktop application too.

Try it for yourself.  Download the Flash Builder 4.5 preview from http://labs.adobe.com

I will post a video of this whole process very shortly on this blog.

Peace, love and may your code compile on the first try!