The Flex 4.6 SDK is available for download here. If you are using Flash Builder 4.5, download and upgrade your IDE for free. You can download Flash Builder 4.6 here. Since Flex 4.5, you can develop desktop AND mobile applications with a native experience on iOS, Android and BlackBerry devices. Flex mobile applications aim to perform and look like native applications. The new features of Flex 4.6 will help you to achieve great performance and experience. If you take your existing Flex 4.5 mobile project and recompile it with Flex 4.6, you should feel great performance improvements, especially with scrolling lists and transitions between views. But the Flex SDK team also worked on new components. Here are the list of some new features available in Flex 4.6 and Flash Builder 4.6:
New set of mobile components
Tablet devices are incredibly successful. The Apple iPad introduced new ways to structure applications and new user interactions. The new set of components available in Flex 4.6 is inspired by classic tablet applications. As you’re targeting a larger screen than a smartphone, you need to review your UI navigation. I’ve already shared some thoughts on this in my post named “Adaptive UI”. Thanks to the new SplitViewNavigator, you can manage the layout of multiple views. The ‘Adaptive UI’ is managed by the component and is based on the device orientation.
How to use SpitViewNavigator:
<s:SplitViewNavigator width="100%" height="100%" id="splitViewNavigator" autoHideFirstViewNavigator="true"> <s:ViewNavigator id="vnList" firstView="views.ListQuestions" width="300" height="100%"/> <s:ViewNavigator id="vnFull" firstView="views.FullView" width="100%" height="100%"> <s:actionContent.portrait> <s:Button id="navigatorButton" label="Show questions" click="splitViewNavigator.showFirstViewNavigatorInPopUp(navigatorButton)" /> </s:actionContent.portrait> </s:ViewNavigator> </s:SplitViewNavigator>
More components are also available and directly inspired from iOS applications: the CallOutButton (popup related to a component), the SpinnerList, the ToggleSwitch and the famous DateSpinner.
Soft keyboard parameters
You can easily enhance the behavior of your soft keyboard. If you’re building a form, with a text input field that is waiting for a phone number, then you can modify the look of your mobile/tablet soft keyboard to display numbers only. You can also customize the label of the “return” key on the soft keyboard (and display “Join”, “Go” or “Search” for example). It’s a very nice feature detailed by Holly in this post.
You can set different values for the softKeyboardType property: number, email, punctuation, url, contact or default. For instance, to display numbers on the keyboard, just add a parameter to your TextInput component:
AIR 3, native extensions and captive runtime
Air 3.1 is attached to Flex 4.6 developments. It means that you can easily embed ActionScript Native Extensions within your Flex mobile project. ANE are a bridge between your Flex mobile app and a native library that can extend the capabilities of the Flex SDK. A list of native extensions are available on adobe.com such as the Gyroscope API, Vibration, Notification, Kinnect… To import an ActionScript Native Extension within your project, just open the new tab in Flash Builder 4.6 dedicated to ANE.
Remember that you can also use the new captive runtime option while packaging a mobile application OR a desktop application. It will create a standalone application that is embedding the AIR runtime. On the desktop, it means that you can actually copy your application on a USB stick and launch it without administration rights! It’s a fantastic new way for deploying AIR apps. On mobile devices, we were already using this technic on iOS. Now you can use the same technic on Android and generate an .apk file that will embed a specific version of the AIR runtime.
Test Flex 4.6 apps on your device
There are already some Flex 4.6 apps available on the Android Market and on the App Store. If you have an iPhone, you can download the free music application called “Radio X-track”. It’s a Flex 4.6 app I’ve been working on, I’ll share more information about this app soon on this blog. Narcissus is also compiled with Flex 4.6 by the way and offers great performance on iPad tablets. Christophe and Holly shared an open-source tablet application to manage your expenses.I’ve also been working on a Flex 4.6 application for tablet users and Flex developers… This application is already secretly available on the Android Market but the app is still “in review” on the app store. As soon as it’s available for both iPad and Android tablets, I’ll showcase this application. More to come…