Developing for Android with Pascal and Eclipse

Phil Hess posted a step-by-step introduction to Android development using Free Pascal and the Eclipse IDE.

With this solution, developers have access to practically the entire Eclipse and Android toolsets. This includes not only the complete set of Android widgets and a graphical designer for laying them out, but also access to the complete Android runtime. The Eclipse IDE will also build the executable and launch the Android emulator (using Run As | Android Application).

You use a Java class the same way you use Pascal classes. For example, to use the SQLiteDatabase class to open a SQLite database, you would write something like this:

  FileName : string;
  Db       : ADSSQLiteDatabase;
  FileName := 'mydb.sqlitedb';
  Db := ADSSQLiteDatabase.openDatabase(FileName, nil, ADSSQLiteDatabase.OPEN_READONLY);

This code example shows the Pascal source for an Android activity:


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s