Difference between revisions of "Android Interface"

From Free Pascal wiki
Jump to navigationJump to search
(redirect)
 
(59 intermediate revisions by 9 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. The main idea of the Lazarus Android port is using capability to allow Android to run the existing Lazarus apps. A generic Java application will be created which exposes the Java Android API to the LCL though the Java Native Interface. The Lazarus user application will be built as a Linux-arm library and be attached to the generic Java encapsulating application. Both will then communicate to ensure that the existing LCL applications run under Android with as little changes as possible.
 
 
 
The encapsulating Java program wouldn't need to be changed by Lazarus users, and no knowledge of Java will be necessary to develop Lazarus applications for Android. Of course Java knowledge will be necessary to work on the LCL Android Widgetset.
 
 
 
== Roadmap ==
 
 
 
# Learn how to write a Java Android application
 
# Learn how to use the JNI
 
# Start building the encapsulating Java application
 
# Start building the new widgetset
 
# Develop both together until the following components are working: TApplication, TForm, TButton, TComboBox, TEdit, TStaticText
 
 
 
== Using the Emulator ==
 
 
 
=== Installing the Emulator ===
 
 
 
=== Building an emulator image with sdcard support ===
 
 
 
Step 1: Run the application C:\Program Files\android-sdk-windows\tools\android.bat
 
 
 
Step 2: Create a new image, by clicking the New button as in the image bellow.
 
 
 
[[Image:Android_new_image.PNG]]
 
 
 
Step 3: Set the name and properties of the image, the size of the SDCard and add hardware support for the sdcard, as seen on the image bellow.
 
 
 
[[Image:Android_new_image_dialog.PNG]]
 
 
 
=== Running an emulator image ===
 
 
 
Step 1: Run the application C:\Program Files\android-sdk-windows\tools\android.bat
 
 
 
Step 2: Select the image
 
 
 
Step 3: Click on the "start" button, as seen bellow.
 
 
 
[[Image:Android_run_image.PNG]]
 
 
 
=== Copying files to the emulator ===
 
 
 
You can use a script similar to this one to copy files from your hard-drive to the emulator. Notice that the image must be running and that it must have sdcard support built inside itself.
 
 
 
<pre>
 
c:
 
cd "Program Files"
 
cd android-sdk-windows
 
cd tools
 
adb push F:\JIL\AndroidJuliana\application.wgt /sdcard
 
pause
 
</pre>
 

Latest revision as of 06:48, 18 April 2012