Sending TCP data from Android (as client) - no data being sent?

拜拜、爱过 提交于 2019-11-30 02:08:49

Try putting an out.flush();out.close(); after the println(..);

CookieMonssster

I had the same problem and Haphazard's solutions wasn't good enough for me. I think that you should use (in this case) output.flush(); and output.close(); instead of out.flush(); and out.close();. And you have to remember about internet permission in AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

after <uses-sdk> and before <application>

Total guess this one, but have you tried calling flush() on the output stream before closing?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!