Android Socket Programming?
I need a little bit help regarding to android socket programming. I had made a server-client prototype using java socket programming. In server client scenario , I am sending commands from 1-10 and sever do some task according to command received from client. e.g. when server receives a command it sever will send a bufferedImage to the client. Its (java prototype) is working fine. In this scenario, both server and client a java des开发者_运维知识库ktop applications, Now I want to make android as a client. Can someone help me in this regard or suggest me good resources of android socket programming?
(Please note BufferedImage class is not supported by Android.)
There is no problem in porting your application. Android runs on Java, which very similar to desktop version. All you need is to migrate BufferedImage
to simple byte array, and to use ImageIO
on your server side.
@Op. Do note that you on the Android device probably also want to keep a PARTIAL_WAKE_LOCK while you are downloading the image.
精彩评论