I am getting ready to hit the road for a series of "RAD in Action Live" Android and iOS Development Tech Preview Events. Over the next two+ weeks I will be visiting developers in Sydney (Aug 27), Melbourne (Aug 28), Auckland (Aug 30), Mumbai (Sep 2), Bangalore (Sep 3), Seoul (Sep 6), Santa Monica (Sep 10) and Irvine (Sep 11). It’s always great to get out of the office and spend time with programmers and our teams in the field. Before I leave, I am getting my devices and development environment ready for the preview tour. I visited many cities earlier this year for our RAD Studio XE4 world tour taking along my MacBook Pro, Samsung Slate Series 7, iPhone 4S and iPad 4. For this preview tour I am also armed with a Samsung Galaxy S4 and a Google Nexus 7 tablet.
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.
If you want to see more multi-device RAD in Action - stay tuned to the Embarcadero blogs where team members are posting preview articles. Some recent Delphi for Android sneak peek posts include:
- Compiling Android Apps with Delphi
- Delphi, Android, ARM Assembler and Extra Awesomeness
- Android SDK, NDK and Device Support in Delphi
- Android in Style
- Native Pickers on Android and iOS
- Printing from an Android device using FireMonkey
- Delphi FirePhoto app on Android
You can also join us in person at the more than 50 stops on our Android and iOS Development Tech Preview Events. I wish I could take part in all of them (maybe when someone builds me a working Star Trek Transporter)!