views:

167

answers:

1

Hello everyone,

I am experiencing a problem with accessing an application from the Android-browser. The application uses DWR to persist connections to the clients that are connected with it.

Everything works fine for me, except that if the application does not send any data to the client on the Android-phone for 2 minutes, the connection seems to be lost and no data arrive at the client. The same scenario works just fine on Firefox, Opera and Chrome. If the pause between two data transfers is less than 2 minutes, it works just fine.

So, now my question: Is there some timeout setting for the android browser that I am missing? Or is this some built-in bug/feature/whatever that I cannot circumvent?

I know that I could prevent this from happening with some sort of heartbeat, I would just like to why this is happening.

Thanks in advance, Max

btw: Everything (server, clients) runs on my machine and I am testing this on the android emulator with Windows XP

Android emulator version 1.10 (build_id CUPCAKE-150240)
A: 

Could it be that the Android system is garbage collecting your activity and thus loosing your web browser and closing the persistent connection?

Perhaps you could check this by looking in you logcat (on android end) or webserver logs (on remote end)?

if this is the case, you would need to add reconnect code into the onresume/onstart method in android.

DEzra