Monday, September 13, 2010

Delphi For Android: Run Under Mono 2.4

The Delphi for Android tool (DCCDroid.exe) run under Mono 2.4 and later.
I haven't tested on a Linux/Mac OS X machine since we don't support Lazarus and Delphi Prism.

More questions time:

Lazarus and Delphi Prism support.
Lazarus support will take while to implement and test on Linux (even if DCCDroid.exe run on Mono) also Delphi Prism use a total different form design (WPF). For now I've decided that its better to focus on pure Delphi support and later on think about Lazarus/Delphi Prism.

Friday, September 10, 2010

Delphi For Android - Lazarus (Free Pascal) Support

DCCDroid doesn't work with Lazarus (Free Pascal) IDE because it reads the form layout to know where to place the controls on an absolute layout position as well as getting the control properties (like text, width/height etc).

Lazarus use a different file format (*.lfm) where Delphi use the DFM file layout.

Another question I received:

How does the tool work internally?

Now that is a top secret inside trade secret! Just to say that it does compile to a native application (not a web application) using the Android SDK. You don't need to deploy any special run time etc. Underneath it use the Android tool chain.

The inner details am not going to share.

Thursday, September 9, 2010

Delphi For Android Sneak Preview 2

In this preview:

- Running in Delphi 2006.
- TEdit and TLabel control together with event on TLabel
- Control properties, you don't need to write anything special just to get or set the value from a control... Just use the property like you always have!
- Actually show you the compiler and what the compile.bat and run.bat files do.

I will try to post a sneak preview at least every month but that depends upon the current Sprint size since each month I set myself a set of goals to archive.

For questions, comments, suggestions please contact me: lenniedg@gmail.com
Twitter: http://twitter.com/delphi_android



What's Next?

- Samples, include all the examples in the package.
- Additional controls
- Additional work on the core tool framework / libraries
- Library support: Allow you to write your own library.

Frequently Asked Questions (FAQ)

What versions of Delphi are supported?

Currently it runs in Delphi 7, 2006 and 2010. Haven't tested with the new Delphi EX yet. Delphi Prism not at all.

Is there Kylix support?

No, and no plans at the moment since Kylix is seen as a dead product.

Is there Lazarus (Free Pascal) support?

No but it should work with Lazarus. I will give it a try.

When will it become available?

Can't say for now since there is sooo much work still left. There will be a beta version but licensing, cost etc unknown at this stage.

C++ Builder support?

See poll below.

In what language is it written in? Delphi?

It's written in C# targeting .NET framework 3.5. The library "Delphi for Android" that you use in Delphi is the only part written in Delphi.

Does it run on an actual phone?

Yes it does, I tested it on my HTC Desire.

What target of Android is supported?

The tool for now default to Android 2.1 but you will be able to indicate the target. Minimum target I guess will be 1.6

Other platforms - iPhone? Symbian? Samsung Wave?

Not now sorry... Am only 1 guy you know :)

Anyone using this yet in a real world application?

I'm giving demos, getting comments and alot of suggestions but for now the tool isn't at a stage yet to be avialable to write a full real world application. For one, you can't sign your application yet for public release.

Poll

I got some suggestions on adding support for C++ Builder.... I'm not going to jump to add support now since that will side track the original project plans etc that will extend delivery since am sure everyone want a working copy to play with soon! For now please fill in the poll and let me know.

Donation

As a contractor a donation would be nice since that will help me to spend more time (time = money as a contractor) to work on it.










Delphi For Android Target Poll

After receiving alot of questions if Delphi For Android will target C++ Builder as well I decided to put this poll up to help me see where I should take it... If I should spend the time now or later.

Saturday, September 4, 2010

Delphi For Android - Sneak Preview

I love programming in Delphi, it was the first Windows development tool that I used after coming from QBASIC and Turbo Pascal 7.0 on MS-DOS (with my old 386SX machine, 2.1GB HD, 6MB RAM).

This is a sneak preview on what I've been working on for the last 2 months... This tool allow you to write Android mobile phone applications using Delphi.

In the first Youtube video I show how you can place a button (TButton) and then call a Android library method to display a message, run the compiler from the command line (its called "dccdroid.exe") and run within the Android emulator.

Tool has been tested with Delphi 6.0, 7.0, 2005, 2006 and 2010.

So how does it work?

The tool is written in C# with Visual Studio.Net 2008. It reads the Delphi form layout (dfm) and then create the XML layout file (main.xml), it then port the Pascal code over to a middle layer that is in Java. Note that it doesn't do 100% conversion to Java but part of the project is in Java.

The full Android (Java) solution get created.
You don't access the Android API directly but by using libraries.

When will it become available?

Can't say for now since am only working on this part time at night and over weekends. It will be a commercial product for sure.

What is my progress?

I'm currently working on the tool's core that allow me to easily add additional controls (TEdit and TLabel I already implemented) together with there properties, events etc. Also to be able to write your own libraries to use the Android API.

Video - Sneak preview 1:

Here I place 2x buttons (TButton) on the Form and write OnClick event handlers for both to display a pop up message.



Running on the phone:

To confirm that it actually do run on your phone and not just in the Android emulator, use this Q-code to download and run the sample on your phone.

Also to tease you more I've included the source code for both Delphi and the generated code (in Test folder).

NOTE: I DON'T TAKE ANY RESPONSIBILITY FOR THE LOST OF LIVE, DAMAGE ETC TO YOUR PHONE BUT ON THAT NOTE YOU CAN TRUST ME SINCE THIS IS A VALID DOWNLOAD THAT WILL NOT KILL YOU OR CONTAIN A VIRUS.

Donation:

As a contractor a donation would be nice since that will help me to spend more time (time = money as a contractor) to work on it.