Ranja AZ 2 Posted May 27, 2021 (edited) Hello! Please, I need help about sending and receiving USSD: how will my program intercept the returned string. Here is the code I am using for sending first USSD code: unit UTestPhoneDialer; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Platform, FMX.PhoneDialer, FMX.StdCtrls, FMX.Controls.Presentation, FMX.Edit, FMX.Memo.Types, FMX.ScrollBox, FMX.Memo; type TForm1 = class(TForm) lblCarrierName: TLabel; lblISOCountryCode: TLabel; btnGetCarrierInfo: TButton; lblTelephoneNumber: TLabel; edtTelephoneNumber: TEdit; btnMakeCall: TButton; Memo1: TMemo; procedure btnGetCarrierInfoClick(Sender: TObject); procedure btnMakeCallClick(Sender: TObject); private { Déclarations privées } PhoneDialerService: IFMXPhoneDialerService; public { Déclarations publiques } constructor Create(AOwner: TComponent); override; end; var Form1: TForm1; implementation {$R *.fmx} {$R *.LgXhdpiPh.fmx ANDROID} procedure TForm1.btnGetCarrierInfoClick(Sender: TObject); begin { test whether the PhoneDialer services are supported on your device } if Assigned(PhoneDialerService) then begin { if yes, then update the labels with the retrieved information } lblCarrierName.Text := 'Carrier Name: ' + PhoneDialerService.GetCarrier.GetCarrierName; lblISOCountryCode.Text := 'ISO Country Code: ' + PhoneDialerService.GetCarrier.GetIsoCountryCode; end; end; procedure TForm1.btnMakeCallClick(Sender: TObject); begin { test whether the PhoneDialer services are supported on your device } if Assigned(PhoneDialerService) then begin { if the Telephone Number is entered in the edit box then make the call, else display an error message } if edtTelephoneNumber.Text <> '' then PhoneDialerService.Call(edtTelephoneNumber.Text) else begin ShowMessage('Please type-in a telephone number.'); edtTelephoneNumber.SetFocus; end; end; end; constructor TForm1.Create(AOwner: TComponent); begin inherited Create(AOwner); TPlatformServices.Current.SupportsPlatformService(IFMXPhoneDialerService, IInterface(PhoneDialerService)); end; end. After first calling, Then I would have to respond to the different USSD information. How do I do? Regard! Edited May 27, 2021 by Ranja AZ Share this post Link to post