Android applications are written in Java, so direct code-level reuse is usually not possible when porting to Qt. Typically, the application design and assets can be reused, with the UI being redesigned and implemented in QML and the application logic rewritten in C++ and QML.
The app's UI will probably need to be redesigned to provide the best usability on a Symbian device, due to differences in the UI style between Android and Symbian. However, the extent to which you need to redesign will vary: a game, such as Angry Birds, will often have its own custom UI and may not need any redesign. However, if the application uses Android's native UI elements, some redesign is likely to be beneficial.
When porting Android web applications, it is likely that some code can be reused. And as you might expect, any application code in the server should be reusable.
For information on mapping Android UI designs to Qt, see Mapping Android UIs to Qt Quick.
The two main options for implementing an app’s UI in Qt are Qt Quick and OpenGL ES. The UI of most apps and games, those without a significant use of real-time graphics, can be rewritten using Qt Quick and the original graphics assets. In addition, by using Qt Quick components it is easy to create a UI that is consistent with the Symbian and N9 UI styles. 3D games, games with fast graphics, or even apps that use special graphics effects will be best ported to OpenGL ES. If your Android app uses OpenGL ES, the good news is that little or no rewriting may be necessary.
In Android apps, JNI enables the use of C/C++ shared libraries from application code. This is not a recommended way to develop basic Android applications, but can be very useful in specific cases: Games might rely on existing game engines for example, which are often written in C/C++. If your Android application uses these kinds of C/C++ shared libraries, code-level reuse is often possible.
In addition to developing Android applications using the Java language, apps can be built as web applications that make use of Android's WebKit implementation. These apps can be created with tools, such as Titanium Mobile, or by using the Webview in a Java-based Android application. For these types of web applications the recommended porting approach is to rewrite the application with Qt Quick, especially if the app demands a rich UI. For more information on Qt Quick, see Qt Quick and Qt Quick Components section. An alternative approach is to build a Qt Quick application with embedded web views that display the content using the source views from the Android web app.
Last updated 17 November 2011
We appreciate your feedback.