×
Namespaces

Variants
Actions
(Difference between revisions)

Porting Android (Java) applications to Java ME on S60 5th Edition

From Nokia Developer Wiki
Jump to: navigation, search
juarezjunior (Talk | contribs)
m (Introduction)
juarezjunior (Talk | contribs)
(Application Development)
Line 19: Line 19:
  
 
[[Image:nokia.jpg]]
 
[[Image:nokia.jpg]]
 +
 +
=== Android platform - Architecture ===
 +
 +
Android architecture is basically divided into several components: Application Framework, Libraries, Android Runtime and Linux Kernel.
  
 
===Application Development===
 
===Application Development===
  
Android has virtual machine called dalvik and it has API implemented by itself which has syntax similar to java but totally implemented by google and open handset alliance so how we will achieve that kind of functionality using JSRS provided by Sun microsystem and java.
+
As mentioned before, Android has virtual machine called Dalvik and every Android application will run on its own process, that is, using its own instance of Dalvik JVM.
 +
 
 +
The Dalvik JVM runs files called Dalvik executables (.dex files), a kind of Java bytecode optimized for the Android platform. The Linux Kernel is based on version 2.6.
 +
 
 +
[[Image:Android-architecture-485b.jpg]]
  
 
====Java Platform ====
 
====Java Platform ====
Line 36: Line 44:
  
 
To get details description about each classes you can refer docs available for both platform. Generally APIS which is used for business logic are similar. It uses the concept of activity and intent which we can port into our platform's event architecture and APIs provided by it.
 
To get details description about each classes you can refer docs available for both platform. Generally APIS which is used for business logic are similar. It uses the concept of activity and intent which we can port into our platform's event architecture and APIs provided by it.
 +
 
===API Similarities and Difference===
 
===API Similarities and Difference===
 
The android have following java packages.
 
The android have following java packages.

Revision as of 21:33, 23 May 2009

Contents

Introduction

Android is a platform for mobile devices maintained by Google and supported by the Open Handset Alliance.

The Android platform includes an application framework, an operating system, a Java Virtual Machine called Dalvik, a web browser based on WebKit, SQLite database, middleware services and key applications.

The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language. However, the Java APIs supported by Android are not standar Java ME APIs (JSRs), so in order to develop an Android application the developer must learn and cope with many new APIs.

Android is built on the Linux Kernel and utilizes a custom virtual machine, commonly referred as Dalvik VM. Although the Android's kernel is based on Linux, developers can only use Java programming syntax to develop Android applications.

Java Micro Edition applications are not compatible with Android due to the new format of bytecodes used by Dalvik virtual machine and due to this fact developers must rewrite Android applications to work on S60 5th Edition devices or any other devices supporting standard Java ME.

This articlpe provides an overview of Android in an extent that will allow you to port Android applications to S60 5th Edition, focusing on Java ME.


Phoneimage.jpg


Nokia.jpg

Android platform - Architecture

Android architecture is basically divided into several components: Application Framework, Libraries, Android Runtime and Linux Kernel.

Application Development

As mentioned before, Android has virtual machine called Dalvik and every Android application will run on its own process, that is, using its own instance of Dalvik JVM.

The Dalvik JVM runs files called Dalvik executables (.dex files), a kind of Java bytecode optimized for the Android platform. The Linux Kernel is based on version 2.6.

Android-architecture-485b.jpg

Java Platform

Android has the latest version of 1.5. In this version there is support of different functionality and most of which can be achieved in Nokia s60 5th edition expect open GL support.


Coding Style

Generally xml files plays major roles in android application but if we see our j2me application which does not have generally xml file playing major role in application. In android application to create User Interface generally developer uses xml file and refer each component by I.D but most of the development language used in s60 5the edition refers each component by name by declaring it in the source file itself.

Packages

To get details description about each classes you can refer docs available for both platform. Generally APIS which is used for business logic are similar. It uses the concept of activity and intent which we can port into our platform's event architecture and APIs provided by it.

API Similarities and Difference

The android have following java packages. Supported.jpg

The following java packages is not available in android which is so similar to J2ME as most of it is not included in j2me too by considering the small devices limitation.

Not Supprted.jpg

Installable

Nokia - Jad, Jar

Android - .apk(using Ant)

Signing

Nokia supports: VeriSign, thawte, Java Verifed Certificate etc

Android supports: by private key ( Tools like Keytool and Jarsigner)


Tools

Permission of Resource

In android the developer need to set permission in the manifest file of android project to let the application or user to access the resource while in j2me if application is not sign then application will ask the permission to user while executing it and by signing it will be secure so there is no need of permission confirmation for most of the resource.

Data Storage on device

J2ME : RMS

android : SQLite database.

556 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×