I have an FireMonkey Android app with a TTabControl, TWebBrowser, and TIdHTTPServer.
I try to redirect HTTP clients to a new URL in the TIdHTTPServer.OnCommandGet event using the following code:
TabControl1.ActiveTab := TabItem2;
AResponseInfo.ResponseNo := 302;
AResponseInfo.Location := ARequestInfo.Params.Values['url'];
But I get an error:
Checksynchronize called from thread $c6f02970 which is NOT the main thread.
How can I change the tab after the request comes to TIdHTTPServer component?