Android development with RAD Studio Welcome to Android Development with RAD Studio. In this session, I’m going to tell you why RAD Studio is an excellent tool-set for Android development, and through a series of demo’s, I’ll get you started using either RAD Studio. This session is aimed at anyone that is totally new to the RAD Studio products. Perhaps you’ve never heard of these products before, or you’ve heard of them but don’t know what they are. I’ll introduce you to these product and show you how you can get started building Android applications with them.
Craig Chapman Software Consultant for Embarcadero Technologies craig.chapman@embarcadero.com CraigChapm53280 Blog: http://chapmanworld.com http://chapmanworld.com/2016/12/05/android-with-rad-studio So who am I? My name is Craig Chapman, I’ve been using RAD Studio products in software development for around 20 years, and now work as a Software Consultant for Embarcadero Technologies, specializing in RAD Studio and associated products. I welcome you to join me on twitter and my blog at chapmanworld.com
Which product is for me? RaD Studio, Delphi, C++ Builder. RAD Studio Includes IDE, Delphi-Pascal and C++ languages. Delphi Includes IDE, and Delphi-Pascal language, but no C++ C++ Builder Includes IDE, and C++ language, but no Delphi-Pascal The RAD Studio line of products offers three options. Option one is RAD Studio, a suite which includes a development environment or IDE named RAD Studio, and it also contains both the Delphi Pascal programming language, and for the C++ programming language. The remaining two options are to purchase a subset of RAD Studio. Delphi is a subset which includes the RAD Studio environment without the C++ language compilers, so it only has the Pascal language. C++ Builder is a subset which includes the RAD Studio environment without the Delphi language compilers, so it only has the C++ language. Your choice of which of these products is right to you, comes down to which language you’d prefer to write code in. If you are already an android developer, the chances are that you’re already familiar with a C-based language such as Java, in which case you may find the C++ language easier to transition to and select the C++ Builder product. On the other hand, if you’re not already a software developer and are coming to this video entirely new, you’ll find that the Delphi Pascal language, while not as commonly used as C++, is easier to learn. It was originally designed to be an educational language, and will more easily introduce you to programming concepts. Pascal every bit as capable as C++, but should you wish to learn C++ later, Pascal also makes a great starting point to transition to other languages. Of course, if you’re part of an existing application development enterprise, then the RAD Studio product, which contains both languages, offers you the greatest flexibility with the option to use and consume existing code written in either language. In this session I’ll be using RAD Studio, however, I’ll point out where instructions differ if you have either Delphi or C++ Builder. Each product is also available in several editions. Starter Edition, Professional and Enterprise. There is also an Architect edition which is the same as the Enterprise edition but comes bundled with some additional products for working with databases. For mobile development you’ll need the Enterprise or Architect edition, or the professional edition with the mobile add-on pack. Mobile development is not available in the Starter edition. Everything that we’ll do in this series can be done using a Trial version of the products, so if you are uncertain as to which product to use, download the RAD Studio Trail to give yourself the opportunity to try both languages!
Agenda (1/3) Why RAD Studio for Android? Getting Started Benefits of RAD Studio Who are Embarcadero? Benefits of True Native Development. Getting Started Installing RAD Studio Connecting your device Hello World So lets take a look at the material that we’re going to cover. Why should you use RAD Studio for Android Development?
Agenda (2/3) Multimedia Working with data Working with Audio Working with the Camera Other Sensors Working with data Consuming REST/JSON Services Visual Live-Bindings
Agenda (3/3) More UI Features Q&A Layout arrangements The style system. Multi-Device Preview Q&A Links Thank-You
Why RAD Studio for Android? Benefits of using RAD Studio Visual drag-and-drop development Visual development means rapid prototyping. It enhances your productivity by allowing you to drag and drop your application UI together in an intuitive design environment, and enables you to see what your application will look like before you deploy it to your Android device. Simple deployment The RAD Studio IDE uses the Android SDK to deploy your applications directly to your Android device or Emulator, and then provides on-device debugging. The process will be quite familiar to existing Android developers. Once configured, RAD Studio takes care of this process for you and provides convenient management of permissions and bundling of resources for your project.
Why RAD Studio for Android? Benefits of using RAD Studio Cross platform You’ve built your application and it’s now time to attend to the apple market with your iOS version. With other tools, it’s time to start over, but with RAD Studio, just change project target and hit build! Single code-base, Single UI design With RAD Studio you can deploy your applications on Android, iOS, Windows and OSX all from the same single code base. Design your UI just once using a single tool (RAD Studio visual designer), and deploy to multiple targets at the flip of a switch.
Why RAD Studio for Android? Who are embarcadero? Embarcadero is focused on developer tools. With a legacy of more than 20 years in the developer tools industry, and having been profitable for almost as many years, Embarcadero is strong, stable and very experienced in providing the tools to do the heavy lifting of development for you. “Leading the Way with Innovative, Heterogeneous Software Tools”
Why RAD Studio for Android? Benefits of True Native Development RAD Studio produces machine level binary code that runs right on the CPU of your device! There are many tools in the mobile development market place which claim to offer cross platform development. They usually achieve this through a scripting system, or a virtual machine, or some type of wrapper around the device browser for HTML ‘transpilers’. Even the Android development tools from Google produce byte-code for the Java runtime (Virtual Machine). We’re different. Rad Studio produces native machine level ARM binary code that runs right there on the CPU of your Android device. This offers the true performance of the CPU, while also making your app more difficult to reverse engineer than it would be if written for Java. None of the Android API’s or devices are out of reach with RAD Studio. With the exception of some rare circumstances, you don’t need to wait for us to catch-up to a new Android release, or to provide access to some new device. The ability to gain access to these services is in your hands.
Why RAD Studio for Android? Benefits of True Native Development What about optimizations only possible under virtual machines like Java or .NET? You may well have been told that there are some compiler optimizations which can only be done at run-time on byte code, and this is true.. What’s also true is that those optimizations are only necessary when running a byte-code application. It’s a simple fact that a virtual machine emulating a CPU, simply cannot out perform the CPU it’s running on! But Android is a Java based operating system?! This is also true, but as the ARM processor is not capable of running Java byte-code natively, it’s not possible for the operating system to be written entirely using Java. Instead, Android is a Java operating system which runs inside a modified version of the Linux operating system. With RAD Studio you gain full access to all of the Java Android API’s, through the JNI bridge, as well as access to the underlying Linux operating system. “If it’s possible with the device hardware and operating system, it can be done using RAD Studio.”
Getting Started Installing RAD Studio Regardless of the product you’re installing, you have the option of using one of two installers. The ISO Installation. You download a .ISO file containing the product, and either use it to create a physical CD, or otherwise ‘mount’ the file as a virtual drive. The Auto-run script will take over and begin the installation. The Web Installer. The web installer is a .exe file which is far smaller than the ISO. Download the .exe file and double click it like any other installer. It will then begin installing the product, downloading the other components it needs as the installation progresses. RAD Studio is a large product which covers lots of development capabilities beyond Android development alone. It will therefore take considerable time to install. The web installer allows you to save time by installing only the parts you wish to use. I’m going to demonstrate installation using the web installer…
Getting Started Connecting your device(S) Create a cross platform project Before we attempt to connect a device, lets have a new empty project ready to deploy to it. Once this project is deployed, we’ll know for certain that everything is working. Add the Android Platform and Build. Some of the components of RAD Studio required to build an Android application (such as the Android SDK), may not have been installed by the installer. Setting your project up to build for android and then attempting to build it, will instruct the IDE to ensure those components are downloaded and installed. Ensure the Android SDK is able to detect the device. Making sure the appropriate development driver is installed, ensure that the Android SDK’s ADB application is able to see your device. The device should be in ‘developer-mode’. Demonstrate installing the google driver.
Demonstration Demonstration.
Links & Additional Resources DocWiki: http://docwiki.embarcadero.com Community: https://community.embarcadero.com Youtube: https://www.youtube.com/user/EmbarcaderoTechNet ChapmanWorld: http://www.chapmanworld.com http://chapmanworld.com/2016/12/05/android-with-rad-studio Samples: C:\Users\Public\Documents\Embarcadero\Studio\18.0\Samples FireUI Live Preview: http://docwiki.embarcadero.com/RADStudio/Berlin/en/FireUI_Live_Preview
Thanks! Any questions? You can find me at: craig.chapman@embarcadero.com and http://chapmanworld.com