Dealing with slow network when downloading roster

Hello Guys.

I’m developing an app for android using asmack but have a problem with the slow phone connections.

When using GPRS I can’t download the roster. Everything works fine with 3G though. I’ve had problems with the network before and have used crude methods to get round them but I’m stumped on this.

So far I’ve tried extending the timeout setting with

SmackConfiguration.setPacketReplyTimeout(15000);

and have also tried

while (roster.size() == 0) {

roster.connection.getRoster();

}

but none of these work!

Is there away to accomplish what I’m trying to do? Any help would be greatly appreciated.

Thankyou,

Harry