Example Applications

These example applications are included in the MoSync SDK in the /examples directory. They highlight many of the features and capabilities of the MoSync libraries and APIs.

Below we give you a brief description of each application. Follow the links for more details. Read our guide called Importing the Examples to understand how to load and view the examples.

HTML5/JavaScript Example Applications

  • WormholeDemo MoSync SDK 3.0+

    This example application demonstrates the MoSync Wormhole JavaScript Library, in particular its support for native UI, sensors, capture, and file storage.

  • WormholeNativeUI MoSync SDK 3.0+

    This simple example application demonstrates the use of HTML markup for creating multi-level native user interfaces. It also shows how to use other JavaScript modules (such as sensors) with the MoSync JavaScript NativeUI API.



HTML5/C++ Example Applications

  • NFCExample MoSync SDK 2.7+

    This example application shows how to use the MoSync NFC API which provides C syscall functions to read and write near field communication tags.

  • WebViewGeoLocation MoSync SDK 3.0+

    The WebViewGeoLocation application displays your current location, as returned by EVENT_TYPE_LOCATION events. This example is useful for understanding the basic mechanisms for communicating between JavaScript and C++.

  • WebViewLoveSMS MoSync SDK 3.0+

    It is fun to send text messages with smileys to friends and loved ones. But it is time consuming to type in lots smileys on a phone. WebViewLoveSMS is an app you can use to easily send messages with lots of heart or kiss smileys to your loved one.

  • WebViewTwitter MoSync SDK 3.0+

    This example application is a simple Twitter client that shows tweets by selected users. Users can be added to a Favorites List stored on the device. The app uses the jQuery JavaScript library and its jQtouch plug-in, and the MoSync Wormhole C++ Library.

C/C++ NativeUI Example Applications

  • DeviceFontsNativeUI MoSync SDK 2.6+

    This example application demonstrates how to count, load, and manage a device fonts for your NativeUI applications.

  • FacebookDemo MoSync SDK 2.6+

    This example application demonstrates how to log on to Facebook from your application, how to retrieve JSON information, and how to manage posts (publish and delete posts). This application makes use of the MoSync C++ Facebook Library, C++ NativeUI Library, and C Widget API.
    ...

  • Graphun MoSync SDK 2.5+

    Graphun is a 3d graph visualizer built with MoSync. It evaluates a custom expression for every point on a grid and displays the result. This advanced application makes extensive use of NativeUI, and it uses an OpenGL view to display the graphs.

  • HelloNativeUI MoSync SDK 2.5+

    HelloNativeUI is a well-commented example application for beginners. It consists of a very simple graphical user interface application that uses the NativeUI library and Moblet framework. It illustrates how to create NativeUI screens, and how to position widgets and handle events....

  • NativeUIDemo MoSync SDK 3.0+

    This example application demonstrates many of the important features of MoSync's NativeUI Library. The library provides a set of C++ classes for handling native user interface components (buttons, toolbars, list boxes, etc.). Under the hood, the library makes use of the C functions in...

  • RockPaperScissors MoSync SDK 2.5+

    This application demonstrates the use of NativeUI screens and widgets to play the traditional game Rock-Paper-Scissors.

  • VideoNativeUIExample MoSync SDK 2.6+

    This example application makes use of the MoSync NativeUI Library and demonstrates how to use the VideoView widget to embed video in your application.

  • WikiSearchNativeUI MoSync SDK 2.6+

    This example application searches Wikipedia, based on user input and selected categories. It makes use of functions in the MoSync Widget API.

C/C++ Example Applications

  • 3DLines MoSync SDK 2.2+

    3dLines demonstrates basic graphics and key input handling.

  • AccelerometerOpenGLES MoSync SDK 2.6+

    This example application makes use of the MoSync Sensor API and OpenGL API to graphically display the orientation of the device.

  • AdvGraphics MoSync SDK 2.2+

    AdvGraphics tests advanced graphics on the phone and keyboard input.

  • BluetoothClient MoSync SDK 2.5+

    This example application acts as a Bluetooth client. It is designed to work with our BluetoothServer example application.

  • BluetoothServer MoSync SDK 2.5+

    This application acts as a Bluetooth server. It is designed to work with our BluetoothClient example application.

  • CameraDemo MoSync SDK 2.6+

    CameraDemo is a simple C++ application built with the MoSync SDK that demonstrates how to control a device's camera. It makes use of the MoSync Widget C API.

  • Connection MoSync SDK 2.2+

    This example application checks the ability of the application and device to connect to the internet.

  • DatabaseTest MoSync SDK 3.0+

    This simple example application demonstrates how to use the MoSync Database API. This example works on all platforms supported by the API (see...

  • Debugging MoSync SDK 2.2+

    This example application uses the debug logging and user panic functions in MoSync. Note: The purpose is to stress the system, and create an error. There is no output to screen.

  • DeviceFonts MoSync SDK 2.6+

    This example application demonstrates how to count, load, and manage device fonts for text drawing using maDrawText and maDrawTextW and the Device Fonts API.

  • GLMoblet_OpenGLES1 MoSync SDK 2.6+

    This example application demonstrates how to use OpenGL ES 1.1 to control a device's graphics hardware.

  • GLMoblet_OpenGLES2 MoSync SDK 2.6+

    This example application demonstrates how to use OpenGL ES 2.0 to control a device's graphics hardware.

  • HelloMap MoSync SDK 2.3+

    HelloMap is a simple application that displays a slippy (i.e. panning) map.

  • HelloMAUI MoSync SDK 2.2+

    HelloMAUI is a well-commented example application for beginners. It consists of a very simple graphical user interface application that uses the MAUI library and Moblet framework. It illustrates how to create MAUI screens, and how to position and control widgets.

  • HelloMoblet MoSync SDK 2.2+

    HelloMoblet is a well-commented example application for beginners. It demonstrates how to use MoSync's Moblet framework to wrap your application to ensure timely response to key events.

  • HelloOpenGLES MoSync SDK 2.5+

    HelloOpenGLES is a well-commented example application for beginners. It demonstrates how to use OpenGL for Embedded Systems from your MoSync Application.

  • HelloWorld MoSync SDK 2.5+

    HelloWorld is a well-commented example for beginners of a very simple MoSync application that uses the Moblet framework. The application demonstrates how to structure the simplest possible application that responds to key events.

  • Location MoSync SDK 2.4+

    This application tests the on-board GPS functionality of the phone, via the MoSync Location API.

  • MapDemo MoSync SDK 2.4+

    The MapDemo application displays slippy maps and makes use of the MAUI library to provide a simple menu system. The menu system enables the user to switch between map sources and is easy to extend with your own code.

  • MAStx MoSync SDK 2.2+

    Tests the console, heap management and memory allocation on the device.

  • MAUIEx MoSync SDK 2.4+

    This application demonstrates the variety of widgets available in the MAUI library and how to use the ListBox and Layout widgets to arrange widgets on a screen.

  • MoSketch MoSync SDK 2.2+

    This application demonstrates simple key input, graphics output, and the permanent storage option.

  • MoSound MoSync SDK 2.2+

    This example application hows how to use MoSync's Sound C API. The example demonstrates how to play and loop a sound once.

  • MoTooth MoSync SDK 2.2+

    This example application demonstrates how to scan for Bluetooth devices and services, store the results in a database, display a list of services, and connects to one of them.

  • MoTris MoSync SDK 2.2+

    Motris is a variation of the old classic game with a similar name.

  • MultiTouch MoSync SDK 2.5+

    This simple application shows how to handle multitouch events so that your applications can react to pinches, swipes and rotatation. This application is based on the MoSync Moblet framework.

  • OtaLoad MoSync SDK 2.4+

    OtaLoad demonstrates network connections, the downloading of an application "over-the-air", and the ability of one MoSync application to run another.

  • PIMExample MoSync SDK 2.6+

    This example application demonstrates how to add, modify and remove a new contact from an address book and how to read contacts from address book.

  • QuakeMDL MoSync SDK 2.4+

    This application either renders a Quake 1 model or, in benchmark mode, measures the raw speed of the target device's CPU. This application is useful for comparing performance across devices.

  • ResourceTest MoSync SDK 3.0+

    ResourceTest is a simple application for all platforms that demonstrates how to use the Resource Compiler and how to handle the resource loading/unloading.

  • ScreenOrientation MoSync SDK 2.5+

    This is a well-commented example application for beginners. It demonstrates how to detect and respond to changes in screen orientation, and also how to set the orientation mode on platforms that support it. This application is based on the MoSync Moblet framework.

  • SensorTest MoSync SDK 2.6+

    SensorTest is a simple application that demonstrates how to use the functions of the MoSync Sensor API to control a device's sensors, and to receive current measurements.

  • Simple MoSync SDK 2.2+

    This example application catches key events and displays the keycodes of pressed keys.

  • Soap MoSync SDK 2.4+

    This application demonstrates connecting to a Web Service using SOAP. It contains a class called SoapRequest which formats an easily modifiable XML Soap request, and a Moblet to test the SOAP communication using a currency converter as an example.

  • Stylus MoSync SDK 2.2+

    Stylus is a simple drawing program, where you draw with your mouse/stylus.

  • Timer MoSync SDK 2.2+

    This program tests simple graphics on the phone, catching a key event and adding some action.

  • Unit Test MoSync SDK 2.2+

    This application provides a battery of tests to help you check the capabilities and limitations of a mobile device.