Difference between revisions of "Android Interface"

From Free Pascal wiki
Jump to navigationJump to search
(redirect)
 
(36 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Architecture ==
+
#REDIRECT [[Custom Drawn Interface/Android]]
 
 
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:
 
 
 
*method 1> Write the Pascal application as a library connected to the Java application via JNI
 
*method 2> Write the Pascal application as an executable and connect it to Java via pipes or sockets
 
 
 
Running the LCL application as a library and communicating with Java via JNI to create a native interface would generate several serious issues:
 
#The main project file would need to be different for Android apps
 
#Free Pascal has some issues with DLLs
 
#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:
 
 
 
* [[Android Interface/Native Android GUI]]
 
** This has the solution of being faster to develop
 
** The bad side is that a native android widgetset will be completely specific to Android, and therefore its work will be lost in the event that the Android platform goes through serious changes or if Android becomes irrelevant in the market.
 
** Lower graphics drawing performance
 
* [[Android Interface/OpenGL ES GUI]]
 
** Longer lasting solution, but takes much longer to develop and getting it stable
 
** Not as well integrated in the system
 
** Higher graphics drawing performance
 
 
 
== Roadmap ==
 
 
 
# Build the set of [[Lazarus Custom Drawn Controls]]
 
# Learn how to write simple FPC apps which use OpenGL in Android
 
# Implement the basic Java Android encapsulating application
 
# Extend the Java app to expose Android APIs
 
# Write the new customdrawn base widgetset
 
# Write the new opengl base widgetset
 
# 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]]
 

Latest revision as of 06:48, 18 April 2012