What's New in MoSync SDK 3.2
Our 3.2 release is packed with tools for the serious mobile app developer. We've extended our libraries and APIs so they now support the Android 4.x platform. We've added JavaScript debugging capabilities on devices and simulators. We've a implemented a new File Upload API in JavaScript, added a new NativeUI Map widget, and extended the ListView widget. And there are many new tutorials to help you get the most out of the MoSync SDK. Let's take a look.
- New JavaScript Debugging Tools
- Support for Android 4.x
- New NativeUI Map Widget
- Improved NativeUI ListView Widget
- File Uploads from JavaScript
- Updates to the Wormhole C++ Library
- Updated Application Templates
- New Example Applications
- New User Guides and Tutorials
- Known Issues and Limitations for MoSync SDK 3.2
- Bugs Fixed in MoSync SDK 3.2
New JavaScript Debugging Tools
Android and iOS
The MoSync IDE now features a fully-featured debugger for JavaScript code. You can set breakpoints in your code, install and run your application package on a device or simulator, and then see the code as it executes in the MoSync IDE. The new debugger will help you cut HTML5/JavaScript development time, ensure the robustness of your code, and get your app to market faster. User's guide.
Support for Android 4.x
We have fully update our Android runtimes so that we now offer support for Android 4.x (Ice Cream Sandwich and Jellybean) devices. That means your existing code should now run without problem on these platforms and that you can make your app available to even more users. Android versions 1.5, 1.6 and 2.1 are no longer actively supported. A full list of all MoSync SDK supported API functions can be found on our Feature/Platform Support page.
New NativeUI Map Widget
iOS and Windows Phone 7
We have implemented a new Map widget in our NativeUI C++ Library. The widget is currently implemented on Windows Phone 7 and iOS devices, but we are hoping to add more platforms soon. Using the Map widget, you can display maps from the platform's native map service and manage pins on the maps. Tutorial | API reference | Example app.
Improved NativeUI ListView Widget
Android, iOS, Windows Phone 7
Our ListView widget now supports alphabetical and segmented lists, sections, and new properties. We've created a great little example app to show it in action. API reference | Tutorial | Example app
We've made many other improvements to our native interface widgets, including fixing nested layouts on IOS and improving screen sliding. We've also made many performance tweeks under the hood so that MoSync's NativeUI functionality is faster than ever. See: NativeUI fixes for 3.2
File Uploads from JavaScript
Android, iOS, and Windows Phone 7
We've extended our Wormhole JavaScript Library with support for file uploads. The new FileTransfer function in the Wormhole File API lets you send files (binaries, images, audio files, etc.) to a server using an HTTP multi-part POST request. You can pass the file name, mime type, and additional key/value pairs when passing the file. Photo Gallery Tutorial | API reference | Example application
Updates to the Wormhole C++ Library
The C++ classes in the Wormhole Library have been updated. The changes are summarized below:
- Enhanced support for invoking custom C++ code from JavaScript.
- New classes have been added to the library.
- Some classes have been deprecated.
Enhanced support for invoking custom C++ code from JavaScript
- New class Wormhole::HybridMoblet has support for declarative specification of custom methods to be invoked on messages sent from JavaScript. See the programming guide Extending HTML5 Apps with C++ for more information.
- There are also undocumented ways to customise the behaviour of the Wormhole JavaScript API in C++. Internal classes in the Wormhole library have virtual methods and protected member variables to support sub-classing. There are also several ways to work with pluggable objects to avoid extensive sub-classing. How to do this is currently not documented, explore the source code of Wormhole for further details. Modify the internals of Wormhole with care, keep in mind that the internal design of Wormhole will likely change over time.
New classes
- Wormhole::CustomMoblet - Flexible Moblet base class that can replace class MAUtil::Moblet
- Wormhole::HybridMoblet - Flexible Moblet for HTML/JS/C++ apps. Replaces class Wormhole:WebAppMoblet
- Wormhole::MessageHandler - Class used internally in the Wormhole library for message handling. There are several ways of customizing this class if needed, both by pluggable classes and by sub-classing.
Deprecated C++ classes
- Wormhole::WebAppMoblet - Use class Wormhole::HybridMoblet instead.
- Wormhole::WebViewMessage - Use class Wormhole::MessageStream instead.
Deprecated JavaScript Message
- mosync.bridge.send(["close"]) - Use the new mosync.app.exit() function instead.
Updated Application Templates
- The MoSync SDK's HTML5 Templates have been updated to use the new Wormhole Library. These templates are available when creating new projects in the MoSync IDE.
For an overview of all the available templates, see Creating Projects from Templates.
New Example Applications
- NativeUIMap — this new example application demonstrates the use of the Map Widget in the NativeUI C++ Library.
- PhotoGallery — a new example application that shows how to use the new File Upload JavaScript API together with the Capture JavaScript API to send image files to a server. It includes a server-side PHP script.
- EuropeanCountries — a new app that shows how the revamped ListView widget supports alphabetical and segmented lists, sections, and properties.
As well as the example apps above, all of our existing HTML5 example apps have been updated to use the new Wormhole C++ Library. Documentation for all example apps is available at http://www.mosync.com/content/example-applications.
New User Guides and Tutorials
JavaScript/HTML5 Cross-Platform User Interfaces — developer guidelines providing a brief overview of what should be considered when creating HTML5 (or hybrid HTML5/C++) MoSync apps that should be used on devices with varying screen sizes.
PhotoGallery Explained — a comprehensive tutorial which shows you how to use our Capture JavaScript API and File Upload C API to create a simple online photo gallery. This in-depth tutorial discusses the programming techniques used in the new PhotoGallery example application, including server programming, user interface programming in JavaScript, and how to extend HTML5/JS applications with custom C++ code.
- Using the NativeUI Map Widget — this new tutorial shows you how to use the NativeUI C++ Library's Map Widget to display maps from the platform's native map service, and how to manage map pins.
- Using the ListView Widget -- a introduction to the new capabilties of the ListView widget, including how to create segmented and alphabetical lists, add sections, and how to set the widget's new control properties.
Debugging JavaScript on a Device — advice, hints, and tips for debugging your JavaScript code on a device from within the MoSync Eclipse-based IDE.
- File Storage Syscall Functions — a new tutorial which describes the low-level syscall functions that we use to create, read, write, and manage file systems on devices. The tutorial includes full code examples for directory listing and file reading
- Working with JavaScript Prototypes — a new beginner's tutorial showing how prototypes can be used to teach JavaScript new tricks and make it behave like other languages.
- Using SQL in Hybrid Apps — This tutorial demonstrates how to use the Database C API in a hybrid HTML/JavaScript and C++ application.Here we use C++ to implement the database functionality by invoking C++ code from JavaScript.
Using JavaScript Callbacks — Callback functions are very common in JavaScript and working effectively with them is an important part of your skillset as an app developer. This beginner's tutorial introduces and their use in the MoSync Application Framework.
Event Handling in a MoSync Hybrid App — A unique features of the MoSync SDK is its ability to handle hybrid apps: applications that mix HTML5, JavaScript and C/C++ code. In this overview of event handling we look at the Wormhole Library's handling of events and messages.
- Interacting With Users Through JavaScript — a beginner's tutorial looking at how to handle alerts, modal message boxes, loading bars, and other dialog elements in raw JavaScript, third-party libraries, and MoSync NativeUI.
All documentation is available online at http://www.mosync.com/documentation.
Known Issues and Limitations for MoSync SDK 3.2
Bugs Fixed in MoSync SDK 3.2