Ads

Ads

Translate

Tuesday 27 August 2013

My first Delphi Android app

By Fajar  |  August 27, 2013 1 comment

One of the test programs I just built is an EditBox, ListBox, Button app (the same app that was the first used to launch Delphi version 1.0 and shown at the Software Development Conference in 1995 running on 16-bit Windows). Using three components and one line of code, I have the same app running on my Samsung Galaxy S4 phone.

To develop a FireMonkey Mobile App, you can start with a mobile application project template.  I chose the "Blank Application" template for my first app.



Next, I placed the 3 components on my main form.



I double clicked on the button to bring up the code editor and added the one line of code inside the Button’s onClick event handler to take the contents of the editbox and add the text as a new item to the listbox.




Finally, I selected Android as the target platform in the project manager and made sure the IDE was connected to my Samsung Galaxy S4 phone ("SCH-I545").


I hit the run button to build the application using our true native code Delphi ARM compiler for Android to create the APK file and deploy it to my Samsung Galaxy S4 phone. I added "Hello" and "world" text in the application and pressed the power and home buttons to grab the screen (I could have also used the Palm Swipe method to capture the screen).



What’s even cooler, the same code can be used with our Delphi true native code compilers for Intel and ARM to compile and run the same project on Windows, OSX and iOS.  All you have to do is set the target platform and use the same form and code.  With my PAServer running on my MacBook Pro, I configured my iOS Device target.

I hit the run button again to build the same application using our true native code Delphi ARM compiler for iOS and deploy it to my iPhone.



Going back to the Project Manager window, I activated the Win32 target and compiled the same app and ran it on my Windows virtual machine.

.

. .

Author: Fajar

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

1 comment:

  1. mas fajar mau tanya saya coba delphi xe5 firemonkey saat di kasih databse mengunkan sqlate pas di run kenapa ngebalnk hitam y .minta solusinya :(

    ReplyDelete

Best Post This Year

Install Fortesreport community Delphi 7 dan RX Berlin

Download  Pertama2 kita harus punya file installernya terlebih dahulu, download  https://github.com/fortesinformatica/fortesrepo...

Total Pageviews

© 2014 Fajar Priyadi. WP themonic converted by Bloggertheme9. Published By Gooyaabi Templates | Powered By Blogger
TOP