Android Interface

This is an old revision of Android Interface, edited by Sekelsenmat at . The current revision is 68701.

/* Android Programming */

Architecture

As of August 2010 (and Android 2.2), the Android platform can only execute Java Android applications, but these applications can load native libraries and can also run native executables. Therefore, to create Pascal applications in Android one can use one of these methods:

Running the LCL application as a library and communicating with Java via JNI to create a native interface would generate several serious issues:

  1. The main project file would need to be different for Android apps
  2. Free Pascal has some issues with DLLs
  3. The Java Native Interface is very complex and very hard to work with. Worse even that it is totally geared to C++ and is very limited.

To avoid these issues it was preferred to create instead a native executable for the Lazarus applications and let it communicate with the auxiliary Java application only for indispensable things.

On top of that, for both solutions there would be two basic GUI solutions possible. Because both are attractive, at the moment both are being worked on and in the future probably one of them will prove itself the best solution:

Roadmap

  1. Build the set of Lazarus Custom Drawn Controls
  2. Learn how to write simple FPC apps which use OpenGL in Android
  3. Implement the basic Java Android encapsulating application
  4. Extend the Java app to expose Android APIs
  5. Write the new customdrawn base widgetset
  6. Write the new opengl base widgetset
  7. Write the new android widgetset

Using the Android SDK, Emulator and Phones

Android Interface/Using the Android SDK, Emulator and Phones

Android Programming

Android Interface/Android Programming

See Also

Setup_Cross_Compile_For_ARM