sockets - Android: Best way to communicate with a server -
i created remote server app connect using sockets. connects , receives data fine when i'm using wi-fi receives data when i'm using 3g. there better way of connecting remotely?
what understand may transferring large amount of data on sockets.
so, when on faster connection, goes through quickly, when on slower 3g connection, takes long time go through.
so, if possible try reduce amount of data gets transferred.
you can try mechanism http://download.oracle.com/javase/1.5.0/docs/api/java/util/zip/gzipoutputstream.html there corresponding http://download.oracle.com/javase/1,5.0/docs/api/java/util/zip/gzipinputstream.html .
these streams compress data send on socket , decompress on receiving side. so, increases processing time little bit reduces amount of data being transmitted.
Comments
Post a Comment