Tuesday, June 21, 2011

Delphi for Android Future

Firstly am going to be very secretive to the future of my Delphi for Android tool since others can and did steel my ideas... Profit from my idea! :-(

There will b a brand new version of Delphi for Android but more than that am not going to say or say when it will become available.

From now on I will not publish more detail about this and the other ideas/tools that am working on.

Thursday, May 19, 2011

Delphi For Android: Warning: You need to manually copy the Android framework library before compile.

After you run the Delphi for Android compiler you will get the following error on the command line:

Warning: You need to manually copy the Android framework library before compile.


The compiler integrate and call Java code, you need to copy Android.java (soon to be called DAndroid.jar) to the /libs folder of your Android generated project.

To give you an update:


Am working very hard on the new compiler, toolset, components etc... Hopefully will have something ready soon.
Unfortunately this is a part-time project so my time is limited.

Focus on:

- New compiler written in Delphi itself (not C#).
- Components/libraries support for the Android SDK.
- Documentation an samples.

Monday, April 4, 2011

Delphi For Android: Post To Mailing Lists

If you got any questions, problems etc please rather post your questions to one of the mailing lists at:

http://code.google.com/p/delphidroid/wiki/Mailinglists


Else its difficult to reply if you post to this blog.

Friday, March 4, 2011

Delphi For Android: Invalid Android SDK Directory

When you run the compiler "dccdroid.exe" and get the following error:

"Invalid Android SDK directory, please make sure that the 'AndroidSDKDirectory' application config points to a valid Android SDK location."

There are a few things you need to check:

1. Update the "DCCDroid.exe.config" file:



Change this to point to location of your Android SDK directory.

2. Make sure that "adb.exe" can be found in that directory e.g on my location machine:

C:\Lennie\Android\android-sdk_r04-windows\android-sdk-window\adb.exe

Wednesday, February 9, 2011

Delphi For Android v0.4.1 Patch Release

Fix bug where AndroidSDKDirectory can point directly to your Android tools directory.
Download it now.

Monday, February 7, 2011

Delphi For Android v0.4 Release

Delphi For Android version 0.4 is ready for download.
In this version I've created binaries for Delphi 6.0.

When is the next release?

The next version of the compiler is written in Delphi and target PhoneGap... It will be released when its ready, goal is to have it by end of Feb 2011.

Wednesday, December 29, 2010

Delphi for Android v0.3 Tutorial

Delphi Prism support iPhone and Android application development using Monotouch and MonoDroid where the goal of Delphi for Android ("Delphi Droid" for short) is to allow any developer that has Delphi 5 onwards to write Android applications.

This is a short tutorial on how to get started with Delphi Droid compiler version 0.3 as it currently is.

Note: The compiler isn't complete, there is still ALOT of work to be done. If you wish to help with the development, please contact me to contribute.

Requirements:
  • The Android SDK together with the Java SDK and Ant. Ant get used to compile the Android application since DelphiDroid generate a standard Android project (similar to how you do it using Eclipse)
  • Download DelphiDroid_v0.3.zip from the Google Code page.
  • Off course you need Delphi 5.0 or later.
  • .Net framework 3.5 run-time
What is in the ZIP:

Within the ZIP file you will find the following directories:
  • bin: There is where the compiler etc are located. You can set this as your SYTEM VARIABLE to call from command line.
  • DelphiDroid/DCCDroid: C# source code of the compile. This can be compiled using MS Visual Studio.Net 2008.
  • DelphiDroid/Framework: The "Delphi For Android" package that all Delphi applications require.
  • DelphiDTest: The Delphi example as in Sneak Preview 2 video.
  • Test: The actual Android projected generated by the compiler from the DelphiDTest example.
Setup Android SDK etc:

I'm not going to explain how to setup the Android SDK, I assume you already have knowledge on how to install the SDK, set it up etc.

Setup the compiler:

Within the bin folder you will find DCCDroid.exe.config file, open this using a plain text editor like Notepad:

  • Change the AndroidSDKDirectory to the location where you installed the Android SDK.
  • Change DelphiBinFolder to the location of the Delphi BIN folder that contains the Delphi compiler etc.
Run the sample program:

Open DelphiDTest and make sure it compile and run successfully in Delphi.

Run the compiler with no parameters:

Open the MS DOS Command prompt and run:

DCCDroid.exe

The output:

Delphi For Android 0.0.0.3 Dev Build
Copyright © 2010 by Lennie De Villiers

Invalid arguments, the following arguments are required:

Project Name - Name of the project
Activity Name - Name of the activity
Package Name - Java package name
Input Source Path - Delphi source directory path
Android Output Path - Android output directory path



So this is very basic command line parameters, i don't need to explain how they work.

You can open compile.bat file under the bin folder for an example:

dccdroid.exe DelphiAndroid DelphiAndroid com.test c:\Demo\DelphiDTest c:\Demo\Test
copy C:\Demo\bin\Android.Framework\*.* C:\Demo\Test\src\com\Test
cd c:\Demo\Test
ant debug

This will compile the example program (assuming the location like c:\Demo) , copy the Android libraries and compile the program.

When all is done you can run the run.bat file:

cd c:\Demo\Test\bin
adb shell rm /data/app/com.test.apk
adb -s emulator-5554 install DelphiAndroid-debug.apk

This will install the sample on the Android emulator.

You can look at compile.bat and run.bat to write your own compile/run scripts.

What is done:

Just like I said before, there is still ALOT of work to be done. Currently only the following components are supported:

TEdit
TLabel
TButton

References:


Mailing Lists:

Users:

http://groups.google.com/group/delphi-for-android-users

General users.

Developers:

http://groups.google.com/group/delphi-for-android-developers

Donations:

If you can't donate your time but wish to don't some money to help with the development, then please contact me.

Tuesday, December 14, 2010

Delphi For Android Future

Now what has Lennie been doing all the time? Am busy working on a new version of the compiler that got a couple of surprises in it... So stay tuned until next year in January 2011 when I will release the first version of the new compiler :-)

Friday, October 29, 2010

DelphiDroid Compiler, Why C#?

Why have I written the DelphiDroid compiler in C#?

C# is the language that I use the most for 90% of all development.... 5% Java and the other 5% in other languages like PHP or Delphi etc. So yes its the language that I got the most experience in currently.

The compiler is also base upon the work I did for the C# For Blackberry toolset (This tool allow you to use C# to code for Blackberry mobile devices).

Saturday, October 16, 2010

Delphi For Android Going Open Source

After a lot of consideration, research etc I've decided to release DelphiDroid (Delphi for Android) as open source. The project is now available for download from the Google Code project page over sub-version.

Over the next couple of days I will release:

- Guide to how the tool works
- A Road Map
- Contribution Guide

Is it ready for production use yet?

No not at all, there are still ALOT of work to be done before its ready for use to write a full application with.

Please subscribe to the development mailing list or contact me if you wish to help.

How are you planning to make money?

By offering my services as a software developer and accept donations etc.

Mailing Lists

Users:

http://groups.google.com/group/delphi-for-android-users

General users.

Developers:

http://groups.google.com/group/delphi-for-android-developers

If your a developer.

Sunday, October 10, 2010

Delphi For Android Progress & Component Poll

Currently focusing on:
  1. Project planning for the next Sprints until first Beta version and first release version 1.0
  2. Indicate Application Icon and other assets
  3. Write Android specific components like TDroidButton (extend TButton), TDroidLabel (extends TLabel) etc that only have Android specific properties/methods/events.
  4. Library support: You can write your own libraries, this will help extending the tool (will blog more about this later)
  5. Audio and video support
  6. Images components
  7. Activity library to manage the activity events etc
  8. Sample applications
All above is still part of the Activity, later tasks add support for Android Services, Intents, Broadcast Receivers, Content Providers, Widgets etc.

Other notes:


C++ Builder support will be added much later and isn't part of this release version 1.0.
Lazarus/Delphi Prism support much later.

Twitter Poll: Create your own Delphi->Android components?

Please fill in the poll here.

I use polls to get feedback on what direction to take in the tool.... Sometimes to make a design decisions is difficult and for that I ask feedback.

Currently all components like TButton etc will have Android specific version that only have Android properties/events.

Only myself can write additional components.

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.








Monday, June 28, 2010

My Babies...


Franky that is our new boy dogie and Zoe our little girl... cuddling on the couch!


Wednesday, June 23, 2010

For The Love Of C++ Part 2

For the last year I've been programming in C++ on a personal top secret project.
I'm using Visual C++ 2010 with the new C++ 0x language features.

C++ is difficult mostly because it needs to b backward compatible with C but it is also powerful. For me I tend to learn everything and sometimes I say to myself "Nope I will not do it that way" Or "Nope, that is dangerous! Never do that". off course all this comes from experience or reading blogs etc to gain knowledge from others that do have the experience.

For example, many times I read "don't do multiple inheritance" and many reasons why... I tried it myself and yes it does hurt. So yes you see why blogs say that.

On that note its always good for you to try something yourself to learn the advantages/disadvantages etc.... remember that programming isn't just about reading about it but actually doing it... get a project to work on being your own personal project, a project at work or join an open source project.

Monday, April 12, 2010

Slow Death Of The iPhone Platform

Yes your heard right, the iPhone platform is going to die a very slow painful death all thanks to its own maker: Apple

Picture an entrepreneur that got an idea for a new fantastic mobile application, off course that person want to target all mobile platforms to archive the greater market place: Android, Symbian (J2ME/C++ whatever the tool), Blackberry, Windows Mobile/Phone 7 and the iPhone.

So the person might get individual quotes for each platform but because the iPhone is such a close environment the developers that can target that platform will off course charge much more for development so because development for all the other platforms are reasonable they might decide that its then not worth targeting the iPhone... Note that even if they do accept the quote there are still all the issues where Apple reject applications to the AppStore sometimes for every stupid bizarre reasons.

Saturday, April 10, 2010

iPhone Development Just Got Harder

When I look into buying a new phone this year I look at a lot of things (does it have a camera, are there apps available , does it have a nice data plan, does it have 3G and Wifi etc) but as a developer I mostly want to code for it... That is why my current phone is a Windows Mobile device since I can easily use MS Visual Studio.Net with C# without having any other cost.

The iPhone is a great device (like the new iPhone 4G will b even better) but its hard to code for it, a big disadvantage.... You need to buy a Mac, learn Objective C or some other tool (like MonoTouch etc), pay the USD $99.00 per year (that isn't actually very bad if you got the money)

With the release of the new terms and conditions for the iPhone OS 4.0, Apple disallow applications not written in C / C++ or rather Objective C.... Development just got harder!

I just want Apple and everyone to remember, for us developers and companies its about USERS/CUSTOMERS... If we can't develop applications easily because a platform is closed down then its the USERS/CUSTOMERS that will suffer since they will not get the kind of applications that they want.

THE USER / CUSTOMER MUST B MORE IMPORTANT, ALWAY!!

I hope this will change for Apple else I will go for another platform like Android where I can actually use a tool like Java to code or go for Windows Phone 7 where you can use MS Visual Studio.Net 2010.