Mobile programming and systems

How to program a mobile device? Which framework to facilitate the task? Which programming language to use? Can we make the application portable? Which OS to choose?
We will try to answer all these questions.

The mobile market

The number of users of advanced mobile, running applications created by third parties, is already higher than the number of desktop computers. It is therefore evident that a programmer needs to focus on this market.

Do not hope on compatibility with desktop systems (although emulators are provided to develop on Windows, Mac, Linux). The interface screens are different and unless it is limited to applications in the browser, we should rethink the application and expect to use different APIs.

Mobile operating systems and programming

The languages and tools are different depending on the operating systems. We will show them but will not go into details of applications structures for each system, they are described in their development centers.

iOS

The iPhone system preferably operates applications written in C or Objective C, or HTML 5.

After banning the use of third party frameworks (like Flash) to create an application that is accepted on the AppStore, on September 9, 2010, Apple has changed its policy and abandoned any restriction on the tools used to build applications for the IOS.
The 3.3.1 term, previously said that for an application to be included in the App Store, the software must be written in Objective C, C++ or JavaScript. No over-layer and no framework was allowed. It is now history.

Statistics show that 80% of iOS developers do not have enough income to support a business and 60% to offset the cost of development. According to a recent article in The Register, there are 700,000 applications in the AppStore, but 25 made 50% of revenues and are games from Disney, Zynga, EA!

Tools

Cocoa is the development tool for Apple and C-like language, with the UIKit framework.

Android

The Google system now has a very broad installed base, equal to that of the iPhone in the U.S. and is therefore one of the two privileged markets for the developer.
The Android SDK provides APIs for building applications. It includes an Android mobile emulator to test the applications on Windows, Mac, Linux.
The ADT plugin for Eclipse adds an IDE.
The NDK, N for native, adds native code, so written in C or other language compiled into binary.
The first programming language is Java, but thank to SL4A it is possible to use another language such as PHP, or C# with Xamarin.

Photo of the Nokia N8

Tizen

It is  the successor for Meego, supported by Intel, Samsung, NEC, and many other firms, it uses HTML 5 for the interface and  Linux as backend. The name is probably an abbreviation of "citizen".
He succeeds Limo too, an initiative of the Linux Foundation for a mobile Linux-based system.
It is an alternative to Windows 8 that will run on tablets and will support applications for Linux, with Qt and GTK. If Microsoft sticks to its intention to charge 30% of applications in Metro, Tizen will surely interest publishers. Applications developed in HTML 5 and WAC will work on all devices.
Its availability with an SDK it planned to first quarter of 2012.

Firefox OS

The Mozilla platform wich be used on first devices in 2013 is the most open since using only web standards. Programming is therefore in JavaScript and HTML and the use API for accessing hardware components.
It uses Android for the backend, but HTML 5 interface has advantages:
- No fragmentation.
- Compatible with all devices.
- Really free because Microsoft charges a fee patent on Android.

Windows Phone

Unlike the iPhone, the Microsoft operating system favors writing application in C#, but you can use C++ also. Applications run on a light .NET version.
The interface can be built with Silverlight or XNA, a framework for games.

Blackberry OS

OS 6 from formerly RIM, now Blackberry, supports multitouch. Programming is done in Java or with the SDK for Web applications.
QNX is used on tablets and allows to run Android applications, provided they are accepted on the App World distribution platform.
Blackberry 10 is based on QNX and succeed to it, it is a unified platform for tablets and smarphones.

WebOS

Based on Linux, webOS supports most of the tools for Linux such as SDL for games. WebOS supports HTML 5, JavaScript, CSS. It is multitasking. It include Node.js that allow for fully portable applications (running even on the desktop).
The PDK allows to add native code, written in C or C++ to applications. The SDK includes a simulator to test applications under Windows or Linux, and Enyo, an Ajax framework that includes widgets. You can add your own widgets.
Enyo replaced Mojo, for a faster framework compatible with HTML 5, suitable for tablet PC.

Meego/Sailfish

This Linux system (hosted by the Linux Fundation) results from the merge of Intel's Moblin and Nokia's Maemo.
Many other manufacturers have joined the Meego consortium, this system works on mobile phones, tablets and netbooks. A common code will be used for all these devices.
Abandoned by Nokia, the system is developed under the name Sailfish by Jolla , a company founded by former employees laid off in mass. In July 2012, it found a first manufacturer.

Sailfish uses the Qt framework and can be programmed with the Qt Creator IDE. The Meego UI Toolkit is a layer added to Qt, it is complemented by Handheld UX for mobiles and Neetbook UX for tablets and netbooks.
The programming language is C++.
Meego is replaced by Tizen which use HTML 5, but the project continues with the independant firm Jolla.

Symbian

Symbian 3 is an open source platform. The PDK (Product Development Kit) can be downloaded to build an application. The ADT (Application Developent Kit) provides the tools to develop an application running on Symbian.
The languages used are C++ with Carbide, Java ME with Eclipse Mobile or NetBeans Mobility, Python with PyS60, Ruby with Symbian Ruby, Flash with Flash Lite, widgets using HTML 5. The.NET support is uncertain.

With the Nokia Qt SDK, we can develop and test applications on the desktop that will run on Symbian and Meego.

Symbian will gradually be replaced by Windows Phone and probably a new Linux-based OS for cheap models. The development of Symbian was transferred to another company, Accenture in June 2011.

Portable development tools

They now may be used on the iPhone providing the applications do not load executable code as Flash can do.

Titanium

Interface Development for Android or local applications. It has its own SDK, an API interface to the system, which facilitates the port from one platform to another.

Unity3D

Unity is a development platform and Unity3D a specialized version for games. The API can be programmed in JavaScript or C#.
These languages are compiled into native language (ARM) for mobile.
The same applications can run on a browser, thanks to a plugin. They also work on Windows and Mac, over .NET.

MonoTouch

Produced by Novell, it is a version for iPhone and iPad of the Mono Framework. Applications written in C# are compiled and linked to the API of the mobile or tablet.
They will not be distributed on the App Store.

Widgets

These are simplified applications, operating directly in the interface of the mobile or inside other applications.
Do not be confused with widgets of frameworks, which are components of interfaces.
How to create and install widgets depends on each system.

The universal platform: HTML 5

HTML 5 is the universal platform, running on all phones without any adaptation of the code but with limitations.
Nokia offers a development kit to build portable apps without native code.
The App Store for the iPhone includes Opera Mini, a smaller version of the browser, dedicated to mobile. It seems that this browser is not a web application platform. Indeed, Opera Mini 5, if it supports SVG and CSS 3, has no support for essential components: HTML 5 forms, Ajax.
But Firefox for Android supports 100% of HTML 5. As does the native browser.

More