Regarding UI for terminal emulation in android

0 votes
asked Jan 19, 2016 by disiko (320 points)

I am currently writing the GUI for android. Based on your suggestion i have implemented a class called Emptyclass which is implementing the IScreen interface. However after binding and calling setcustomscreen i am not getting any callback to the methods of EmptyClass. Our expectation is when the connection is established a welcome screen of our terminal emulator need to get displayed. For this it need to call the write method of IScreen implemented class. However non of the methods of Emptyclass are getting called. Please find the below code snippet and suggest me changes.

EmptyClass et = new EmptyClass(this); //Emptyclass implements IScreen
SetContentView (et);//Resource.Layout.Main);
Telnet te = new Telnet("",23);

Rebex.TerminalEmulation.VirtualTerminal vt = new Rebex.TerminalEmulation.VirtualTerminal(500,500);
vt.Bind (te);
Rebex.TerminalEmulation.Interop.TerminalExtensions.SetCustomScreen (vt, et);
}catch(Exception e) {


commented Jan 20, 2016 by Lukas Matyska (43,090 points)
I noticed that you are creating VirtualTerminal(500,500);
Please note that standard terminal size is 80x25. More over, you want to display it on Android device which has much smaller display than PC.
It seems to me unreasonable to create such big terminal.

1 Answer

0 votes
answered Jan 19, 2016 by Lukas Matyska (43,090 points)

Please note, that data are not processed automatically. You have to instruct the terminal what to do.

In your case, you want to process received data continuously, so add this line at the end:

while (vt.Scripting.Process(1000) != TerminalState.Disconnected);

Or better, start this routine in a background thread, so the GUI is not blocked.