I\'m trying to send a picture I choose from the gallery on my phone, and send that picture from the phone to my PC, when I click on the button it should take the picture\'s
Instead of trying it in emulator on PC try to run the same on a mobile device. Also I have changed the Port number to 8000 instead of using 1149 port.
With these changes the code worked fine for me. Please check.
you have just to add the permission
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
and it will work perfect.
It aint working cos u havn't reintialized your variable current to 0 It seems your are apending in the subsequent loop without reseting the value. So in my guess it might be causing problem in the second iteration of your execution.