Tag Archives: Appmethod

Full Access to Android and iOS API using Delphi FireMonkey

Description :  You will learn how to get full access to Android and iOS API in your application using Delphi FireMonkey.
Objective: Get full access to Android and iOS API in FireMonkey.
Presenter: Brian Long from Brian Long Consultancy & Training Services Ltd
Event: CodeRage 8 and Brian Long’s Blog.
Software Versions Supported: Delphi XE5 / XE6, Appmethod
Level: Intermediate
Source code: Source code from Accessing the iOS API session and Accessing the Android API session.  Also download fmxexpress.com full set of Android SDK Object Pascal interface files on Github.

There are thousands of components and libraries (both free, commercial and open source) available for Firemonkey.  However, there will be times you will need functionality for your application that are no readily available libraries and components for. For example, you may need additional functionality for the media player component that comes out of the box with Rad Studio XE5 and XE6.  Functionality such as streaming from a remote server (on-demand) or even streaming a live event. You may also want to access methods in the AudioRecord class in Android for audio capture, but unfortunately there are no out of the box solutions currently in Rad Studio.

Embarcadero has done and is continuing to do a great job with FireMonkey to make sure it has all the essential library necessary from iOS and Android APIs.  And given time, I am sure developers will get full access to these APIs out of the box.  In the meantime, there is another way to get access to these additional APIs in your application.

Brian Long from Brian Long Consultancy & Training Services Ltd did two very interesting presentations at Coderage 8 where he did an excellent job (for such a complex topic) explaining how to access the Android and iOS API directly.  These videos are based on Delphi XE5, but since then, Brian has written two extensive articles, explaining some of the topics he covered in these videos, and the necessary updates for Delphi XE6.  After watching the videos, read Brian Long’s “Creating a splash screen for Delphi XE6 Android apps” and “Launching activities and handling results in Delphi XE6 Android apps” articles.

To bring out full access to iOS and Android APIs, an Object Pascal interface file must be created.  This interface file is the bridge to connect the Object Pascal world to the JAVA and Objective C world.  There are currently three different automated solutions available for Android to help with this process. I am not aware of any for iOS as yet. The three automated tools are  Android2Delphi (paid version – bitcoins only), Java2pas (free & paid version) and JavaImport for Android (paid version only).  Fmxexpress.com has also gone ahead and used Java2pas against the entire set of android.jar files for Android 7, Android 8, Android 10, Android 12, Android 14, Android 15, Android 16, Android 17, and Android 19.  You can read his blog post on Full Android SDK Interface Files In Object Pascal For Firemonkey.

Accessing the iOS API by Brian Long from Long Consultancy & Training Services Ltd

Accessing the Android API by Brian Long from Long Consultancy & Training Services Ltd

Choosing the Right Menu Navigation for your Mobile App

Description :  You will learn Delphi FireMonkey UI design tips and tricks when designing and creating responsive navigation menu.
Objective: How to create Navigation Side Drawer for mobile applications using FireMonkey.
Source: Malcolm Groves, José León and Sarina Dupont’s blog.
Software Versions Supported: Delphi XE4, XE5, XE6,  C++ Builder XE5, XE6, RAD Studio XE5, XE6, Appmethod.
Source Code: Source code can be downloaded from in Malcolm Groves’ Github repository.
Level: All

A common challenge when designing a responsive mobile application is the navigation menu.  There are several navigation menu options such as the Toolbar Only Navigation, the Tabbed Bar Navigation, the Side Drawer Menu, and the App Home Screen Navigation.

Two of the more commonly used navigation menus are the Tabbed Bar navigation (more commonly used in iOS apps) and the Side Drawer navigation which has become fashionable on Android.  The Tabbed bar navigation is a row of tabs along the top or buttons along the bottom of the screen.  This navigation design provides intuitive user experience allowing users to know what are their available options from one screen.  However, the downside to the tabbed bar navigation is that the tabs or buttons takes up valuable real estate on small mobile displays.

The side drawer menu on the other hand, has the  advantage of more screen real estate, but may take away user engagement, if the engaging menu options available to users has been tucked away in the side drawer.

There is an earlier article written by Malcolm Groves on how to design a Facebook-style layout for your mobile app using Delphi XE4 and Delphi XE5. Sarina Dupont has expanded on his blog post with another great article on Creating a Navigation Drawer for your Mobile Application using XE6 and Appmethod.

José León also has a video on how to create a sliding popup menu in Delphi XE5, that will show up when the user clicks a button on the toolbar. The process is very much similar to the drawer and shows you some UI design tricks to get a nice visual result.

Choosing the right Menu Navigation depends largely on users experience.  If most of the user experience takes place in a single view, and the only things such as user setting and options are needed to be accessed in seperate screens, then you should focus on having your main UI nice and clean by tucking away these settings/options in the side drawer menu. However, if your mobile app has multiple views that users will be equally engaged in, then side navigation may not be the best option.

Delphi Firemonkey Source Code for Bluetooth Remote Control Car

MiniCooperBluetoothCar

Description : Delphi source code for Bluetooth remote control car.
Objective: Learn how to use Bluetooth technology in Delphi Firemonkey to control or interact with Bluetooth devices and gadgets.
Presenter: Daniele Teti and Daniele Spinetti of bit Time Software.
Source: JDaniele Teti and Daniele Spinetti blog post.
Software Versions Supported: Delphi XE5, Appmethod
Level: Intermediate
Source code: The free source code for bluetooth app can be downloaded on Github.

Daniele Teti and Daniele Spinetti of bit Time Software have developed an app to control the BBZ201 – Mini Cooper S Bluetooth Car via Bluetooth for Android.  Jim McKeeth created a GitHub repository for the project where you can download the code. The iOS version to be released soon with the same codebase.

The BBZ201 Mini Cooper S Bluetooth car can be controlled via mobile’s orientation sensor or touch-screen button interface. It has a super fast motor with full directional steering capability and can be purchase on Amazon for approximately $45.00.

The App currently does not have Bluetooth discovery, you will need to add the car’s MAC address to the source code once you have pair your device. You can add Bluetooth discovery feature yourself if you are interested.  Get the full Bluetooth interface in Object Pascal for the Android SDK interface project on Github which was loaded by fmxexpress.com. Also take a look at Android Bluetooth API.

You can find out more about pairing of Bluetooth devices in a webinar video by Jim McKeeth which you can find in one of my earlier articles: “Programming Mobile Devices and Gadgets using Firemonkey”.