Have you add the internet permission in manifest like this?
uses-permission
android:name=android.permission.INTERNET/uses-permission
? 2011/6/27 11:10, ??? ??:
I use deflater to compress string data. It works fine on java console
project, but while running on android enviroment, server will
i found the problem by myself. It's problem of the usage of deflater,
correct solution should be:
public static byte[] deflaterCompress(String str) throws IOException
{
TOTAL_LEN = 0;
byte[] input = str.getBytes(encoding);
Deflater deflater = new Deflater();
deflater.setInput(input);
I use deflater to compress string data. It works fine on java console
project, but while running on android enviroment, server will report buffer
error problem and reture 500.
SendMessage(String content, String url)
{
byte[] bs = deflaterCompress(content);
URL url = new URL(urlStr);
You do not set content length. It supposes to be chunked, but it's worth to
set some http watcher and see what actually you transfer.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
i tried that, result has no difference
2011/6/27 Дениска, Рынский (из за Угла) denis.ryn...@gmail.com
You do not set content length. It supposes to be chunked, but it's worth to
set some http watcher and see what actually you transfer.
--
You received this message because you are subscribed
5 matches
Mail list logo