I have the following code in Delphi FMX on Android:
TDialogService.MessageDialog('Test Close message', TMsgDlgType.mtInformation,
[TMsgDlgBtn.mbOK], TMsgDlgBtn.mbOK, 0, nil);
I need to auto-close TDialogService.MessageDialog after 3 seconds.
I tried Screen.MousePos.SetLocation(x, x) for set a tap to simulate.
On Android,
TDialogService.MessageDialog()simply callsIFMXDialogServiceAsync.MessageDialogAsync()(as Android does not support synchronous dialogs). The default implementation is buried in theTFMXDialogServiceclass in theFMX.Dialogs.Androidunit.You don't have access to the UI dialog it creates, so you can't close it manually. But, what you could do is write your own class that implements the
IFMXDialogServiceAsyncinterface, and then register that class with FMX (you will have to remove the default service first). Then, you can do whatever you want with your dialog implementation. For instance, you could display your own Form that has a timer on it to close the Form.