Click here to Skip to main content
Click here to Skip to main content

Installing MoSync for Android (and other mobile platforms)

, 2 Aug 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Article #2: How to install the multi-mobile-platform MoSync development environment

Installing MoSync for Android (and other mobile platforms)

Android Tutorial Contest

This is my submission for Article #2: Setting Up Your Android Development Environment. Its main claim to distinction is that it describes how to install MoSync, a development environment which isn't very well known, but has the advantage of supporting a wide range of mobile platforms, not just Android.

Introduction

OK, you’ve finally decided to start developing for Android. After all, it’s ridiculous for a programmer to have a tablet, a phone, a camera and a watch without programming them, right?

But… you don’t like Java, and the instructions for the NDK seem too complicated. And whatever you write, your husband will want the same thing on his iPad. And your father will want it on his Blackberry. And your brother on Windows Mobile.

Enter MoSync. The MoSync Software Development Kit is a complete development environment for all those platforms, and more. You write your program in C/C++ (or Javascript), and MoSync will compile it for the platforms you choose. By using the APIs provided, your application will work on all those devices, without any changes.

Best of all, it’s free and released as Open Source.

For full details of the MoSync SDK, look no further: http://www.mosync.com/sdk/.

Do I need a license?

If you’re using MoSync just for fun, no.

If you want to sell your apps, but release the source code under the GPL, then again, no.

If you want to sell your apps and keep your source code to yourself, then you need a commercial license. But even that doesn’t need to cost you anything. MoSync offers a free commercial license. The only thing that you pay for, if you want it, is support.

Full details of MoSync licensing are available here: http://www.mosync.com/mosync-dual-licence-model.

Getting Started

Download MoSync

Head for the MoSync SDK web site at http://www.mosync.com/download and click on the download button of your choice (Windows or Mac). It’s a bit big (over 200MB) so you’ll probably want to get some coffee while you’re waiting.

If you’re looking for something to read, you’ll find links to installation guides, user guides, tutorials, reference manuals and sample applications, all on the same page. You might also want to take a look at another MoSync product: MoSync Reload. This is intended for multi-platform HTML5 and JavaScript development, which is a different subject.

Install MoSync

No surprises here. Just double-click on the installer you downloaded. Depending on your OS, you may have to allow it to make changes to your system. A little window will show progress:

Once it’s been unpacked, the MoSync Setup will run:

There’s the usual license agreement to accept:

then the choice of components:

Not a great deal of choice, in fact, which makes things easy. Obviously, you need MoSync and its prerequisites, so you can’t deselect them. You just decide what shortcuts you want created. The whole package will take up about 441 MB on your hard disk.

On the next screen, choose your destination folder. It probably makes life easier if you put it in a folder without any spaces in the path.

Click on Install, and off you go:

You’ll see a few command windows on the way as MoSync installs its files and the runtimes that it needs. Then after a few minutes, it’ll all be over:

just click on Close; the installation is complete and the new shortcuts are available in your start menu:

Uninstall MoSync is obvious, and to be honest, I haven’t looked at BMFont Generator. The other two entries are more interesting.

Online User Guides will open MoSync’s documentation page at http://www.mosync.com/docs/index.html:

From here, you’ve got access to the detailed documentation for all the APIs, as well as sample applications and tutorials. The documentation is very clear and very well written.

(Optional) Download, install and configure the Android SDK

The MoSync installation already includes its own emulator as well as compilers for the different platforms, so this step is optional. However, if you want to use the official Android emulator, you’ll want to download and install the Android SDK. As there are already plenty of articles about that, I won’t go into details here.

Run MoSync

MoSync IDE is what this has all been for. Click on this shortcut, and the MoSync IDE will start:

It’ll ask where you want to store your projects. This is the default, but you may want to move it to your own documents folder.

If you haven’t already done so, you’ll be asked to register with MoSync, so that you can keep up to date with developments. Don't worry; you won't be bombarded with spam. You may be asked a few more questions regarding the configuration, and then the welcome screen will appear:

From here, you can go to the documentation, import the examples, or start programming. The IDE is based on Eclipse, so it’s not hard to find your way around.

To help you get started, it’s well worth clicking on Import C++ Examples. This will run an import wizard to load about 50 samples supplied with the installation:

The samples include the famous “Hello World” (but that’s for another article):

Configure MoSync for Android

If you’ve installed the Android SDK, you’ll need to tell MoSync where to find it. Click on Windows and then Preferences to open the dialog. Navigate through MoSync Tool / Android / Android SDK and fill in the location of the Android SDK:

Conclusion

If you’ve made it this far, you now have MoSync installed and configured on your computer, and you’re ready to go. The sample applications will help you get started, and the documentation is complete and well-written.

My next article will show how you can use MoSync to develop a simple application and try it out in the emulator and on your Android device. Have fun!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

K Stock

France France
Kevin's introduction to computing was when studying O Level Maths in Belfast, NI.
His first computer was a Science of Cambridge (Sinclair) MK14 with 512 bytes of RAM and a hexadecimal keyboard. He is the creator of Oraperl, the first database-enabled version of Perl, which eventually led to the better-known DBI module.

Comments and Discussions

 
QuestionMy vote of 5 PinmemberFranc Morales5-Sep-14 0:34 
AnswerRe: My vote of 5 PinmemberK Stock5-Sep-14 1:14 
GeneralRe: My vote of 5 PinmemberFranc Morales5-Sep-14 12:27 
GeneralThanks for the entry! PinstaffKevin Priddle5-Aug-14 11:31 
GeneralRe: Thanks for the entry! PinmemberK Stock5-Aug-14 21:03 
GeneralMy vote of 5 Pinmembernewton.saber4-Aug-14 4:12 
GeneralRe: My vote of 5 PinmemberK Stock4-Aug-14 4:55 
GeneralI would love to try it... PinprofessionalV.Naveen3-Aug-14 18:20 
GeneralRe: I would love to try it... PinmemberK Stock3-Aug-14 21:09 
GeneralRe: I would love to try it... PinprofessionalV.Naveen3-Aug-14 22:55 
AnswerRe: I would love to try it... PinmemberK Stock3-Aug-14 23:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141216.1 | Last Updated 2 Aug 2014
Article Copyright 2014 by K Stock
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid