TTMSFNCTaskDialog problem on Android

Hello,

I need to get a text on Android. The same code works well with Windows, but on Android it doesn't.

I use this code:

var TaskDialog: TTMSFNCTaskDialog := TTMSFNCTaskDialog.Create(Nil); 
.. // title, content etc.
TaskDialog.InputType := titEdit; 

TaskDialog.Execute(
      procedure(ModalResult: TModalResult)
      begin
        case ModalResult of
          mrOk:
            Begin
             
             ShowMessage(TaskDialog.InputText;);

           end;
        End;
      end);

Now the code above always showed empty string, no matter what I wrote in.
Then I checked the ModalResult :
ShowMessage(IntToStr(ModalResult)); -> this returned 1, so it seems it never entered although the only button was OK on the dialog.

Then I ommited the whole Modal result check:

      TaskDialog.Execute(
      procedure(ModalResult: TModalResult)
      begin
        ShowMessage(TaskDialog.InputText;);
      end
);

This gave me empty string again.

So to summarize, TTMSFNCTaskDialog didn't give me back neither the ModalResult, nor the input text.

What should I do?
Thank you!

Hi,

The ModalResult is correct (mrOK = 1). And in case of custom buttons you'll get results starting from 100 where 100 means the first custom button.

The issue here is related to how the InputText was updated internally. We applied an improvement so the edit field contents are available on mobile platforms too. The next update will contain the necessary changes.

Hi Tünde,

Thank you very much for your reply. When will the next update be available?
I need to send the app to the customer at the first week of January and it is based on input text.

Thank you!

Please check your private messages for an incremental source update.

1 Like