Why my Android app exit suddenly?


I am using Delphi 10.2 to create Android app that uses Rest components to read returning data from post form. When I press on a button to load the data it load them normally after about 3 seconds freeze. The problem if the user try to click (or touch) any control on the form the app exit immediately after the 3 seconds freeze but if the user did not touch the app the data was loaded normally !

What is the reason for that and how I should fix it ?

The code I use for the button is


I use 3 components RESTClient , RESTRequest and RESTResponse

and here is the code I use to get the data:

procedure TfrmMain.RESTRequest1AfterExecute(Sender: TCustomRESTRequest);
return_response: string;
if RESTResponse1.StatusCode = 200 then begin
//fill years
return_response := RESTResponse1.Content;

memo1.text := return_response;



Comments are closed.