×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Porting from Android to Nokia Platforms

From Nokia Developer Wiki
Jump to: navigation, search
ilkkal (Talk | contribs)
m (Ilkkal - whoops, drop android category)
ilkkal (Talk | contribs)
(Ilkkal - remove some qwidget stuff)
Line 1: Line 1:
 
[[Category:Porting]][[Category:Qt]]
 
[[Category:Porting]][[Category:Qt]]
 
{{UnderConstruction}}
 
{{UnderConstruction}}
 
  
 
{{SeeAlso|
 
{{SeeAlso|
<br>
 
 
'''The complete porting article series'''
 
'''The complete porting article series'''
*[[Porting Mobile Applications to Qt]]  
+
*[[Porting Mobile Applications to Qt]]
*[[Porting from iPhone to Nokia Platforms]]  
+
*[[Porting from iPhone to Nokia Platforms]]
*[[Porting from Android to Nokia Platforms]]  
+
*[[Porting from Android to Nokia Platforms]]
*[[Porting iPhone web app to WRT on Nokia devices]]  
+
*[[Porting iPhone web app to WRT on Nokia devices]]
 
*[[Fundamental use cases for porting iPhone and Android applications to Qt]]
 
*[[Fundamental use cases for porting iPhone and Android applications to Qt]]
*[[Useful-porting-examples]]  
+
*[[Useful-porting-examples]]
*[[Qt Quick examples for porting]]  
+
*[[Qt Quick examples for porting]]
*[[Wordpress developer story]]  
+
*[[Wordpress developer story]]
<br>
+
 
}}
 
}}
<br>
 
<br>
 
<br>
 
 
==Porting Android apps to Nokia Platforms==
 
  
 
[[File:porting-android-to-qt.png|300px]]
 
[[File:porting-android-to-qt.png|300px]]
  
Android applications are typically written in the Java™ language. Despite the machine-independent Java language, however, the applications are Android-specific and are heavily based on the Android Application Framework.  
+
The following article describes recommended ways to port different types of
 +
Android applications to Nokia platforms, and also covers the most typical
 +
special cases.
  
As a result, direct code-level reuse is typically not possible in porting of the applications. In most typical cases, it is recommended that you reuse the application design and graphics and rewrite the code using Qt technologies, but there are also several special cases.
+
== Normal Android Java Apps ==
  
The following article describes recommended ways to port different types of Android applications to Nokia platforms, and also covers the most typical special cases.  
+
[[File:porting-java.png|300px]]
  
== Overview to Porting from Android ==
+
Since Android applications are written in Java, direct code-level reuse is
 +
typically not possible when porting to Qt. Typically the application design and
 +
assets can be reused in a new QML UI, and the code rewritten.
  
[[File:porting-java.png|300px]]
+
== Java Native Interface ==
  
=== Java™ MIDP ===
+
A notable special case is where the Java Native Interface (JNI) is used in the
 +
Android application. JNI allows the use of C/C++ shared libraries from Android
 +
code.
  
The Java code written for Android's Application Framework is not compatible with, for example, Java MIDP (Java™ Platform, Micro Edition [Java™ ME]) libraries traditionally used in mobile devices.  
+
Although this is not a recommended way to develop basic Android applications,
 +
it is very useful in some specific cases — for example, with games relying on
 +
existing game engines, which are often written in C/C++.
  
In some specific cases where there is a relatively great amount of Java-based application logic and a very simple UI, the best option to port the application may be to use the mobile information device profile (MIDP), which allows code-level reuse. MIDP MIDlets can be run on Series 40 and Symbian devices from Nokia, but not on Maemo™ devices.  
+
If the Android application uses these kinds of C/C++ shared libraries,
 +
code-level reuse is also often possible, especially towards the Maemo platform
 +
but also sometimes towards the Symbian platform.
  
In general, the recommended way to port is to rewrite the application with Qt to enable the best possible experience on the latest Symbian and Maemo devices, as well as future-proof implementation.
+
== WebKit ==
  
=== Linux kernel ===
+
Nowadays, in addition to developing Android applications directly in the Java
 +
language, several Android applications are also built as web applications using
 +
the WebKit approach with tools like
 +
[http://www.appcelerator.com/products/titanium-mobile-application-development/
 +
Titanium Mobile] or by utilizing the LibWebCore in manual fashion from the
 +
Android application.
  
Android runs the Linux kernel underneath, in a manner similar to Nokia’s Maemo platform.  
+
For these types of web applications the recommended porting approach is to
 +
rewrite the application with Qt Quick, especially if the intention is to
 +
develop an impressive UI. For more information on Qt Quick, see [[Porting
 +
Mobile Applications to Qt#Qt Quick and QML Language|Porting Mobile Applications
 +
to Qt: Qt Quick]].
  
Unlike Maemo, however, Android has very different application level layers on top of Linux. Direct porting of applications by reusing code between these platforms is typically not possible, despite the underlying Linux platform.  
+
Developers could also consider building a Qt Quick application and basing its
 +
functionality on embedded web views; for more information, see [[Fundamental
 +
use cases for porting iPhone and Android applications to Qt#Web View|the
 +
Fundamental porting use cases document]].
  
While Android development is based on its Java-based application framework, Maemo applications are built using tools and technologies that are commonly known in the Linux world, such as GTK, SDL, and nowadays the Qt cross-platform application framework, which also supports Symbian  devices.
+
== User interface ==
  
=== Java Native Interface ===
+
[[File:porting-graphics-requirements.png|450px]]
  
A notable special case of the above is where the Java Native Interface (JNI) is used in the Android application. JNI allows the use of C/C++ shared libraries from Android code.  
+
Although code cannot typically be reused, the graphics and design of the
 +
application can often be reused to good effect. For example, in Qt Quick,
 +
scaling of the existing UI elements is very easy and may not require much
 +
rework from the UI designers.
  
Although this is not a recommended way to develop basic Android applications, it is very useful in some specific cases — for example, with games relying on existing game engines, which are often written in C/C++.  
+
Generally, however, your application will look best and be most usable if you
 +
take some time to redesign the application layout. An application layout that
 +
looks great on an Android device may not be very usable on a Nokia device,
 +
since the usage paradigm of user interface and available features affecting the
 +
user experience are different.
  
If the Android application uses these kinds of C/C++ shared libraries, code-level reuse is also often possible, especially towards the Maemo platform but also sometimes towards the Symbian  platform.
+
For more information on UI design for Nokia devices, see
 +
[http://www.developer.nokia.com/Design/ the Nokia Developer Design and User
 +
Experience Guide].
  
=== WebKit ===
+
== How to Proceed with Porting ==
  
Nowadays, in addition to developing Android applications directly in the Java language, several Android applications are also built as web applications using the WebKit approach with tools like [http://www.appcelerator.com/products/titanium-mobile-application-development/ Titanium Mobile] or by utilizing the LibWebCore in manual fashion from the Android application.
+
To proceed with porting, the following guides are recommended (part of this
 +
"Porting mobile application to Qt" article series):
  
These types of web applications are usually best to port to Nokia platforms using Web Runtime (WRT) technology; [[Porting iPhone web app to WRT on Nokia devices]]. A Qt WebKit approach or simply rewriting the application with Qt Quick are also options to consider, especially if the intention is to develop an impressive UI. For more information on Qt Quick, see [[Porting Mobile Applications to Qt#QML (Qt Quick)|Porting Mobile Applications to Qt: Qt Quick]].  
+
*[[Porting Mobile Applications to Qt]], if your existing application is UI
 +
intensive, or for any generic native iPhone application. This is the main
 +
introductory article about porting to Qt.
  
Developers could also consider building a native Qt application and basing its functionality on embedded web views; for more information, see  [[Porting Mobile Applications to Qt#Web View|Porting Mobile Applications to Qt: Web View in iPhone, Android and Qt]].
+
*[[Porting from iPhone to Nokia Platforms]] - high-level starting guide for
 +
porting iPhone applications to Qt
  
=== User interface ===
+
*[[Fundamental use cases for porting iPhone and Android applications to Qt]] -
 +
a few powerful modules and how to port those to Qt
  
[[File:porting-graphics-requirements.png|450px]]
+
*[[Useful-porting-examples]] - common features needed for porting applications
 +
to Qt
  
Although code cannot typically be reused, the graphics and design of the application can often be reused to good effect. For example, in Qt Quick, scaling of the existing UI elements is very easy and may not require much rework from the UI designers.
+
*[[Qt Quick examples for porting]] - examples for creating fancy UI elements
Generally, however, your application will look best and be most usable if you take some time to redesign the application layout. An application layout that looks great on an Android device may not be very usable on a Nokia device, since the usage paradigm of user interface and available features affecting the user experience are different.
+
with Qt Quick
For more information on UI design for Nokia devices, see [http://www.developer.nokia.com/Design/ the Nokia Developer Design and User Experience Guide].
+
  
== How to Proceed with Porting ==
+
*[[Porting iPhone web app to WRT on Nokia devices]], if your existing iPhone
 +
application is based on a server-side web implementation or is mostly
 +
implemented in HTML/CSS and JavaScript™ in the client side.
  
To proceed with porting, the following guides are recommended (part of this "Porting mobile application to Qt" article series):
+
*[[Wordpress developer story]] describes the real-life experience of porting an
 +
application from iPhone to Qt. Both iPhone and Qt sources of the Wordpress
 +
client are also available as open source.
  
*[[Porting Mobile Applications to Qt]], if your existing application is UI intensive, or for any generic native iPhone application. This is the main introductory article about porting to Qt.
+
* See also [http://www.developer.nokia.com/Design/ Nokia Developer Design and
*[[Porting from iPhone to Nokia Platforms]] - high-level starting guide for porting iPhone applications to Qt
+
* User Experience Guide] for ideas on how to achieve the best possible user
*[[Fundamental use cases for porting iPhone and Android applications to Qt]] - a few powerful modules and how to port those to Qt
+
* experience when porting your application for Nokia devices.
*[[Useful-porting-examples]] - common features needed for porting applications to Qt
+
*[[Qt Quick examples for porting]] - examples for creating fancy UI elements with Qt Quick
+
*[[Porting iPhone web app to WRT on Nokia devices]], if your existing iPhone application is based on a server-side web implementation or is mostly implemented in HTML/CSS and JavaScript™ in the client side.
+
*[[Wordpress developer story]] describes the real-life experience of porting an application from iPhone to Qt. Both iPhone and Qt sources of the Wordpress client are also available as open source.
+
 
+
* See also [http://www.developer.nokia.com/Design/ Nokia Developer Design and User Experience Guide] for ideas on how to achieve the best possible user experience when porting your application for Nokia devices.
+
  
 
----
 
----
  
 +
Copyright © 2010 Nokia Corporation. All rights reserved.
  
Copyright © 2010 Nokia Corporation. All rights reserved.
+
Nokia, Nokia Developer, and Maemo are registered trademarks of Nokia
Nokia, Nokia Developer, and Maemo are registered trademarks of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Apple, iPhone, iPod and MacBook are trademarks or registered trademarks of Apple Inc. Android is a trademark of Google Inc. Other product and company names mentioned herein may be trademarks or trade names of their respective owners.
+
Corporation. Java and all Java-based marks are trademarks or registered
 +
trademarks of Sun Microsystems, Inc. Apple, iPhone, iPod and MacBook are
 +
trademarks or registered trademarks of Apple Inc. Android is a trademark of
 +
Google Inc. Other product and company names mentioned herein may be trademarks
 +
or trade names of their respective owners.

Revision as of 17:46, 4 July 2011

Underconstruction.pngUnder Construction: This article is under construction and it may have outstanding issues. If you have any comments please use the comments tab.

Porting-android-to-qt.png

The following article describes recommended ways to port different types of Android applications to Nokia platforms, and also covers the most typical special cases.

Contents

Normal Android Java Apps

Porting-java.png

Since Android applications are written in Java, direct code-level reuse is typically not possible when porting to Qt. Typically the application design and assets can be reused in a new QML UI, and the code rewritten.

Java Native Interface

A notable special case is where the Java Native Interface (JNI) is used in the Android application. JNI allows the use of C/C++ shared libraries from Android code.

Although this is not a recommended way to develop basic Android applications, it is very useful in some specific cases — for example, with games relying on existing game engines, which are often written in C/C++.

If the Android application uses these kinds of C/C++ shared libraries, code-level reuse is also often possible, especially towards the Maemo platform but also sometimes towards the Symbian platform.

WebKit

Nowadays, in addition to developing Android applications directly in the Java language, several Android applications are also built as web applications using the WebKit approach with tools like [http://www.appcelerator.com/products/titanium-mobile-application-development/ Titanium Mobile] or by utilizing the LibWebCore in manual fashion from the Android application.

For these types of web applications the recommended porting approach is to rewrite the application with Qt Quick, especially if the intention is to develop an impressive UI. For more information on Qt Quick, see [[Porting Mobile Applications to Qt#Qt Quick and QML Language|Porting Mobile Applications to Qt: Qt Quick]].

Developers could also consider building a Qt Quick application and basing its functionality on embedded web views; for more information, see [[Fundamental use cases for porting iPhone and Android applications to Qt#Web View|the Fundamental porting use cases document]].

User interface

Porting-graphics-requirements.png

Although code cannot typically be reused, the graphics and design of the application can often be reused to good effect. For example, in Qt Quick, scaling of the existing UI elements is very easy and may not require much rework from the UI designers.

Generally, however, your application will look best and be most usable if you take some time to redesign the application layout. An application layout that looks great on an Android device may not be very usable on a Nokia device, since the usage paradigm of user interface and available features affecting the user experience are different.

For more information on UI design for Nokia devices, see [http://www.developer.nokia.com/Design/ the Nokia Developer Design and User Experience Guide].

How to Proceed with Porting

To proceed with porting, the following guides are recommended (part of this "Porting mobile application to Qt" article series):

intensive, or for any generic native iPhone application. This is the main introductory article about porting to Qt.

porting iPhone applications to Qt

a few powerful modules and how to port those to Qt

to Qt

with Qt Quick

application is based on a server-side web implementation or is mostly implemented in HTML/CSS and JavaScript™ in the client side.

application from iPhone to Qt. Both iPhone and Qt sources of the Wordpress client are also available as open source.

  • See also [http://www.developer.nokia.com/Design/ Nokia Developer Design and
  • User Experience Guide] for ideas on how to achieve the best possible user
  • experience when porting your application for Nokia devices.

Copyright © 2010 Nokia Corporation. All rights reserved.

Nokia, Nokia Developer, and Maemo are registered trademarks of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Apple, iPhone, iPod and MacBook are trademarks or registered trademarks of Apple Inc. Android is a trademark of Google Inc. Other product and company names mentioned herein may be trademarks or trade names of their respective owners.

242 page views in the last 30 days.
×