TTMSFNCWaitingIndicator doesn't display

In a FireMonkey mobile app (just running on Android for now), I am calling a REST endpoint. I want to show the wait indicator first, call the endpoint and then hide the wait indicator. The following code all works correctly, but the wait indicator never shows.
Any ideas what I need to do?

Cheers,
Paul

procedure TfrmLogin.bLoginClick(Sender: TObject);
begin
  //send user name and password to server for verification
  frmMain.waitIndicator.Visible := True;
  frmMain.waitIndicator.Active := True;
  try
    myRestClient.BaseURL := gblURL;
    myRestRequest.Params.Clear;
    myRestRequest.Params.AddItem('', '{"pUser": "' + eUsername.Text + '", "pPassword": "' + ePassword.Text + '"}', pkREQUESTBODY, [], 'application/json');
    myRestRequest.Execute;

    //if it's ok, login and go to first page
    if myRestResponse.StatusCode = 200 then begin
      ParseLoginJSON(myRestResponse.Content);
      fMain.mvDrawer.MasterButton := fMain.MasterButton;
      fMain.MasterButton.Visible := True;
      fMain.lEmployee.Text := gblLogin.STAFF_FIRST + ' ' + gblLogin.STAFF_SURNAME;
      fMain.mbNewWorksheetClick(Self);
    end else begin
      TDialogService.ShowMessage('There was an error logging in. Please try again.' + #13#10 + 'Status: ' + IntToStr(myRestResponse.StatusCode));
    end;
  finally
    frmMain.waitIndicator.Visible := False;
    frmMain.waitIndicator.Active := False;
  end;
end;

The RestClient is blocking the main thread, therefor the UI of the app isn't updated as well.

With the TMSFNCRESTClient you don't have this problem as the request is handled on a different thread.

Thanks Gjalt. I originally tried using the TTMSFNCRESTClient, but although it worked perfectly when I ran the app as a Windows app, it wouldn't work as an android app on my phone.
Once I switched to the standard delphi REST components, it worked under Windows and Android.
Is there anything you can think of that could cause this with the TMS Rest client?

Thanks,
Paul

As you are working in a different thread you might need to use the TThread.Queue in the response event.

procedure TForm4.FormCreate(Sender: TObject);
begin
  r := TTMSFNCRestClient.Create(Self);
  r.OnRequestResponseStringRetrieved := DoReq;
  r.Request.Host := 'https://myURL';
end;

procedure TForm4.Button1Click(Sender: TObject);
begin
  r.ExecuteRequest;
end;

procedure TForm4.DoReq(Sender: TObject; ARequest: TTMSFNCRESTClientExecutedRequest; AResultString: string);
begin
  TThread.Queue(TThread.Current, procedure
  begin
    Button1.Text := 'Received';
    Memo1.Text := AResultString;
  end);
end;