Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!


Access The Com Port On Android With Delphi XE5 Firemonkey Component

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE5 Firemonkey ComPort Android | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Winsoft has a native pascal component for Delphi XE5 Firemonkey on Android which will allow you to communicate with the ComPort of your Android device. Apparently not all phones have a ComPort but HTC devices do. There is a native library for Android in Java that will allow you to access the ComPort too but this component does not appear to use that library and is in pascal. This is a commercial com port component but it comes with a free trial so you can see if it works for you first. The example that is included with the free trial is pretty straight forward. Here is some sample code to read and write data to the ComPort:
procedure TFormMain.MemoKeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);

procedure TFormMain.TimerTimer(Sender: TObject);
var Text: string;
Text := AComPort.ReadUtf8;
if Text <> '' then
Memo.Text := Memo.Text + Text;

Head over and get the free trial of the com port component.


Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes


Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores


DelphiCon 2020 FireMonkey Sessions Available Starting November 19

Sign up for our Newsletter and
stay informed


Leave a Reply