Hi
My code for Windows its working!!!
But for Android not, I'm using FireMonkey, here is my source code:
Server:
Code:
procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
var
MIRec: string;
begin
MIRec := AContext.Connection.IOHandler.ReadLn;
Memo1.Lines.Add('recebido = ' + MIRec);
end;
Client:
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
try
form1.IdTCPClient1.Host := 'localhost';
form1.IdTCPClient1.Port := 4040;
form1.IdTCPClient1.Connect;
except
ShowMessage('Connection Unsuccessful: ');
end;
form1.IdTCPClient1.IOHandler.WriteLn(edit1.text);
end;
What can be wrong on Android?
Thanks
Bookmarks