[android-developers] Re: Prob in sending Image

2013-01-21 Thread bob
 

I would say output a header telling the server the length of the file.


Then just write all the binary data of the file.


It would be similar to how a web server spits out an imageā€¦


Content-length: 1000


[binary image data]



On Sunday, January 20, 2013 11:26:37 AM UTC-6, ajinkyas...@gmail.com wrote:

 Hi Everybody

 M  sending the image from android to java server using socket programming
 as i want to send to ip addrs but there is prob in sending the image
 I tried converting into string and writing it into txt fie but there's 
 prob in writing it into the txt file so there's prob in 
 converting it into image at server side.

 So does any one have solution for it
 It will appreciated
 Thanks


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Prob in sending Image

2013-01-20 Thread jason_gates
Hi,
When I've used HTTP to communicate with a servlet container (E.G. tomcat or 
jetty), The HTTP client uses Base64 to encode the image. Thus, I would try 
encoding the image when you send (from the client). On the server, I would 
decode the image. Base64 is used often to encode images for transport. 

Good Luck :)
Jason

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en