开发者

Android Telnet tutorial

Are there any Telnet client source Samples or Tutorials that help Beginners (ME) understand how to open Sockets and develop apps using sockets.

I went through all the samples using Eclipse and various Tutorials online but none of them that I have found seem to work correctly - either old or dead code or just missing information.

I assume I will need to include a java.net jar file but where is it开发者_如何学Python and how do I include it?

using Eclipse I went through the few tutorials but none of them did much more than Hello World and show me how to drag and drop buttons and edit text.

Thanks in advance for any help


Your answer has basically been given, If you're using android you're already using java. Here's the android reference for sockets: http://developer.android.com/reference/java/net/Socket.html I would (like amir) looking at some basic java IO tutorials. There's an ok list of java socket tutorials on oracle's site.

And finally, the best advice... Go forth and code!


This is really not relative to android. java.net is already included in android sdk because android sdk is modification of JDK. Instead of googling or researching android sockets. Just look at how to make socket connections in Java. There is a class call Socket which will allow you to open and transfer data between remote server.


1st off you've got to use the android SDK to build a correct structure for an android app, then copy/paste your java code. This will take a few or maybe dozens of iterations of attempts depending on the size and complexity of the code you are bringing over. You will have to repeatedly Import all the java and/or android packages needed by your code. Eclipse will attempt to point out what you need but this suggestion isn't always right but frequently it is.


Telnet it's not a simple tcp connection. I use free apache commonse library which provide class for telnet accessing. Otherwise you need create you own class for establishing, and provide telnet session.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜