After starting to study the characteristics of Android, some aspects can be observed that, while not always an advantage over their competitors, they are interesting and can impact positively on his election platform. For example:
     -> Although Google avoids using the term too, the fact of using language as popular as Java helps minimally experienced any programmer can begin to schedule their applications without any problems, as well as encourage those who are already very familiar.It also incluvdes the most important API this language as java.util, java.io and java.net.

      -> The Apache license allows everyone to study, modify and distribute the Android system, while giving private development option by issuing commercial applications. Every developer can decide how best to distribute their own work.

      -> As is known, Android divides all applications into components or building blocks that, combined, constitute the final program. Thus, we have blocks visible to the user via interfaces (Activity), blocks that run in the background out of his knowledge (Service), blocks listen for certain events (Broadcast Receiver) and blocks providing content to other applications (Content Providers .) This philosophy is original and functionally helps modularize applications.

     -> The delegation of actions in other applications Intents is another of the most innovative aspects offered by Android. By an Intent, the application simply states what to make and is the system in charge of finding the most appropriate application (to call, send an email, open a web page, etc.).. Likewise, applications can announce to the others who are prepared to address certain types of Intents.

     -> The construction of user interfaces has been a very careful, not only by the extensive collection of features and designs incorporated, but for the possibility of being defined on both the source and through external XML documents.

     -> Access to device resources, such as GPS, Wi-Fi, etc., It becomes easy and simple thanks to the SDK API.
     -> The declaration and use of external resources such as images, strings, numeric values, or even different models and user interface design is comfortable and easy to perform.

1> Differences with Java ME: Architecture

     The comparison that follows is focused on the specific architecture MIDP / CLDC / KVM (CLDC 1.1 and MIDP 2.0), compared to Android OS 1.6.

   ■  Libraries and Descriptors
    → APIS that control the life cycle of the application.
   ANDROID: Mainly used android.app.Activity y android.app.ListActivity.
  MIDP/CLDC: Mainly used javax.microedition.midlet.MIDLET.
    → APIS that define the user interface application.
  --> High Level
     ANDROID:  Mainly used android.widget.ArrayAdapter y android.widget.ListAdapter
    MIDP/CLDC: They are essentially javax.microedition.lcdui.Display yjavax.microedition.lcdui.Displayable
   --> Low Level
     ANDROID: Mainly used android.graphics.drawable.Drawable y android.view.View
    MIDP/CLDC: They are essentially javax.microedition.lcdui.game.GameCanvas y javax.microedition.lcdui.Displayable.Canvas
 
   → Half APIS: Bluetooth, Multimedia and  sensors.
   --> Bluetooth
     ANDROID: Android provides the following library to use this interface, android.bluetooth.
    MIDP/CLDC: Cldc is an optional package for use Bluetooth (JSR 82): “Bluetooth API”.
   --> Multimedia
     ANDROID: It offers the following library for audio and video playback, android.media: MediaPlayer.
    MIDP/CLDC: CLDC provides the optional "MMAPI and basic support in MIDP 2.0 API: Manager, Player and Control packages javax.microedition.media y javax.microedition.media.control.
    --> Sensors and accelerometer
     ANDROID: Android provides android.hardware.SensorManager class, which serves to drive the orientation sensor, and accelerometer.
     MIDP/CLDC: CLDC is an optional package to manage the sensors connected to the phone (JSR 256): "Mobile Sensor API."
     → Descriptors.
     ANDROID: AndroidManifest.xml
    The components needed by the application are listed in a file called AndroidManifest.xml, which is an XML file where you declare the components and what its capabilities and requirements.
     MIDP/CLDC: Descriptor JAD
    To describe the properties of the application and the components that are part of it. Thus, the AMS (Application Management System) can check if it is possible to install the application before downloading it. It is a text file with a. Jad.
  ■  Architecture: The life Cicle of the application
     ANDROID: In Android, there are 4 major building blocks: Activity, Intent, and Content Service Provider, of which the blockActivity is the most common applications for Android, that is, an Activity component reflects an activity carried out by an application, and that is typically associated with a window or user interface. The four possible states that define their life cycle are: Active, paused, stopped and restarted.
    MIDP/CLDC: The class responsible for the lifecycle of an application, the MIDlet class, and methods to manage the lifecycle of an application are three: active, paused and destroyed.
  ■ Virtual Machine: KVM and CVM (Java ME) vs. Dalvik (Android)
    ANDROID: The JVM that uses Android's virtual machine DalvikVM. We can find a big difference regarding the Java virtual machine (JVM) as Google virtual machine is not based on a stack.
    MIDP/CLDC: In the MIDP profile, the JVM is the KVM virtual machine, which is the smallest virtual machine developed by Sun, and is used with CLDC. This is an implementation-oriented and especially small devices with low computational and memory capabilities.

  ■  Rafic interface inheritance in Java
   ANDROID: Android inherits the following Java libraries:
          java.awt.font.* To define properties of the style and font size. (Subset of J2SE)
          java.beans.*: To define beans with getters and setters. (Subset of J2SE)
          java.io.*: Generic connection.
          java.lang.*  Classes VM. (Subset of J2SE)
          java.math.* For mathematical operations.
           java.nio.*  To define buffers.
          java.security.*  Classes to define the security model. (Subset of J2SE)
           java.sql.* JDBC API to use and manage SQL database.
          java.text.* To define different text formats.
           java.util.* Standard utility classes. (Subset of J2SE)
          javax.crypto.* Classes for performing cryptographic operations.
          javax.microedition.khronos.* Classes oriented 3D interface design.
          javax.net.* Classes for network applications (Subset of J2SE)
       javax.xml.* To use XML in the application descriptor.

  MIDP/CLDC:  The MIDP profile, it inherits the following Java libraries:
    java.io.* Classes and standard packages / O (Subset of J2SE)
   java.lang.* Classes and interfaces in the VM. (Subset of J2SE)
    java.util.* Classes, interfaces and standard utilities. (Subset of J2SE)
It also incorporates the following technology inherited from Java:
- SWING: The profile "Personal Profile" on CDC provides a profile chart based on AWT.
- JDBC: CDC optional package.
- RMI: CDC optional package.

  ■  Instant Messaging: SIP(Java ME) vs. XMPP(Android)
    ANDROID: Android offers an API to develop protocols for instant messaging, XMPP specifically (Extensible Messaging and Presence Protocol) protocol for exchanging XML-based message.
    MIDP/CLDC: Java ME with MIDP profile offers an option package to use instant messaging protocols, specifically SIP(Session Initition protocol).
  ■ Data Storage: RMS(Java ME) vs. SQLite(Android)
     ANDROID: Android offers android.content.ContentProvider supperclass for data handling and storage,also known as " content provider ”. This building block, can share data between processes and applications.
   In addition, Android SQLite DB supports and provides control functions that let you store complex data in object form.
    MIDP/CLDC: MIDP offers javax.microedition.rms library for persistent memory, which consists of a simple binary database (without using SQL) oriented stores records (RecordStore).

  ■  Browser (Java ME) vs. WebKit (Android)
   ANDROID: The Android OS has a built-in browser engine based on the WebKit open project.
   MIDP/CLDC: CLDC offers customers the opportunity to develop web "Web Services APIs."
  ■ Portability of Applications
  ANDROID: In this area, Java ME has a huge advantage over Android, as it has a VM "totally Java", while Google VMde(Dalvik), despite its great advantages already mentioned, makes the migration of an application open- source of Linux x86 is really hard. All user interfaces and logic must be rewritten from scratch.
  MIDP/CLDC: The existence of various Java ME profiles are able to guarantee the portability of applications using an API is not as complex and extensive as in the case of Android, but enough to make code portable between different mobile devices.

Can you run a java ME project in a movile with ANDROID?

    Sure, using MicroEmu (J2ME emulator done in Java) or with the J2ME MIDP Runner

2> Differences with Android (Aspects of Programming)

 ANDROID: It develops applications in the following programming environments:
        ·         Eclipse
        ·      Netbeans
 MIDP/CLDC: It develops applications in the following programming environments:
        ·         J2ME Wireless Toolkit 2.2
        ·         J2ME WTK 2.5
        ·         Java ME Platform SDK 3.0
        ·         Netbeans: Mobility Pack 4.1
        ·         Eclipse: Plug-in EclipseME

  ■  Midlet(Java ME) vs. Activity(Android)
 ANDROID:  In a screen Android (associated with a user interface) corresponds to the Activity class, and to move from one screen to another class is used as follows Intent:
 Intent intentLista = new Intent();      intentLista.setClass(Clase1.this,Lista.class);//origen,destinostartActivity(intentList);//para pasar a la pantalla asociada a la clase Lista
 MIDP/CLDC: In MIDP to move from one screen display uses the class as follows:
this.midlet.getDisplay().setCurrent(this.midlet.getLista());
Where the method getLista () returns an object of type List of high-level API

 Additionally, Command class is used to add a command to the display and can change from one screen to another using the following method:
                                          addComand(Command)

  ■  Security model
 ANDROID: Android is in the file AndroidManifest.xml. For example, if we want to access low-level API, ActivityManager, to get the number of running processes, we must add the following line to the descriptor:
 <uses-permission id="android.permission.GET_TASKS" android:name="GET_TASKS"/>
 MIDP/CLDC:  Modeled CLDC sandbox and MIDP 2.0 provides a standard application-level security using digital signatures for determining whether an application is reliable or not associated with a security domain. The policies allow you to specify the permissions assigned to each domain.
  ■  Event Management (listeners)
 ANDROID: Mainly used android.view.View.OnClickListener (to capture the OnClick event of any part of the layout, such as a button) and android.view.MenuItem.onMenuItemSelected (when using the Menu key to interact with the user to captureOnClick event of one of the options menu).
 MIDP/CLDC: It follows the management of events and listeners defined in Java SE, so we have sources of events that keeps listeners who are interested in knowing when an event occurs and provides methods which allows listeners to be added to that list. So when the source generates an event, it notifies the corresponding listener to process the event, running the scheduled action. Furthermore, the low-level API can program the keyboard and pointer events. For example, in the class managed javax.microedition.lcdui.game.GameCanvas keyboard events using the method for polling GetKeyState ().
  ■  System Properties
 ANDROID: System properties are defined in the file AndroidManifest.xml, which describes the application, the necessary permits, etc ... All projects Android have this file, among other things, will give us the option of requesting that we need permits,and define the initial activity to be executed.
 MIDP/CLDC: System properties are defined in the application descriptor file (JAD) and are obtained via java.lang.System and javax.microedition.MIDlet, for example:
                                                        System.getproperty(String key)

  ■ Memory usage
 ANDROID: In this regard Android is the winner because the terminals Android no restrictions on memory, because each Android application runs its own process, with its own instance of the Dalvik VM. Dalvik allows efficient use of those instances.Run files in the format. Dex optimized for minimum memory consumption.
 MIDP/CLDC: J2ME Systems have significant memory constraints for storing and running applications, restrictions under 50K.
  ■ Using threads (contexts)
ANDROID:  Offers the package java.util.concurrent inherited from java, and android.os for process synchronization mechanisms, tasks, threads and activities.

   The main difference between the two technologies is that Android offers a "multi-tasking", ie each Android application runs in its own process, which is created by the application when running and remains until the application stops working, or memory system required for other applications. A key feature of Android is that the life cycle of an application is not controlled by the same application but the system is determined from a combination of states such as which applications are running, which have priority for the user and how much memory is available on the system. In this way, Android puts each process in a hierarchy of "importance", specifically follows the POSIX standard, so that the policy of removal process is transparent to the programmer, as the bottom layer of the platform consists of a core Linux (version 2.6) used as a hardware abstraction layer (HAL, Hardware Abstraction Layer). If the developer wants to see the processes running at low level, the only possibility is to use the AIDL, which offers the programmer to display the OS calls the IPC methods. MIDP/CLDC: Java ME, al igual que Android ofrece un entorno “multithreaded”, ya que permite realizar múltiples actividades simultáneamente, pero se diferencia en que el Planificador de hilos (el cambio de contexto) no lo puede controlar el programador sino que puede suceder en cualquier momento. Aún así, existen “trucos” para que el programador sea capaz de gestionar varios hilos dentro de una misma aplicación.
  ■  HelloWorld
 In this last section compares the two projects HelloWorld program in both technologies.
 ANDROID:
 El código sería el siguiente:
 public class HolaMundo extends Activity {
    public void onCreate(Bundle icicle) {
            super.onCreate(icicle);
            TextView tv = new TextView(this);
            tv.setText("Hola Mundo");
            setContentView(tv);
    }
 }

 MIDP/CLDC:
  The code is as follows:
 public class HolaMundo extends MIDlet {

    // Componentes del interfaz de usuario    private Display display;
    private Form form;

    //Constructor de la clase.    public HolaMundo() {
      // Cogemos el display      display=Display.getDisplay(this);
      // Creamos el form       form = new Form ("Mi primer MIDlet");
      form.append("Hola Mundo!!!\n");
    }

    //Método que iniciar la ejecución del midlet    protected void startApp() {
        display.setCurrent(form);
    }

    //Método que interrumpe la ejecución del midlet    protected void pauseApp() { }

    //Método que se llama cuando se finaliza el midlet    protected void destroyApp(boolean incondicional) {
      display = null;
      form = null;
    }  }