This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Android and the fly likes Browser App Not sending HTTP request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Browser App Not sending HTTP request" Watch "Browser App Not sending HTTP request" New topic
Author

Browser App Not sending HTTP request

Rana Dey
Greenhorn

Joined: Jul 05, 2012
Posts: 10
We have developed a android browser application (javascript) which keeps (every 3Sec) on sending a http (GET) request to my REST server (hosted on TOMCAT).

Everything works fine till the time phone is in operation. But as soon as phone is lying idle, the browser application's javascript stops sending the HTTP requests.

The phone is connected with our test WIFI router, and in the phone setting we have kept WIFI connected even if phone goes in the idle state.

We are capturing HTTP packets with wireshark on the REST server machine. Till the time phone is in working state, we recieve HTTP request packet but as soon we leave the phone (and it goes to idle state) idle, HTTP packets stops appearing on the Wireshark (however some TCP packets are visible).

The same behavior is there on IPhone device as well, Is it the default behavior of SmartPhone browsers?

Please help if someone have faced this kind of situation or have similar experience.

PS. on android, the browser we are using is the default browser and android version is 4.0.3
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
Probably a precaution against sucking the device's battery and data plan empty. If this was a proper Android app you could convert this part into a Service to ensure it keeps executing.


Ping & DNS - my free Android networking tools app
 
 
subject: Browser App Not sending HTTP request
 
Similar Threads
Response as PDF
TCP socket communication with wired internet (not WLAN)
UDP DatagramSocket.receive() glitches
Long running request returns no HTTP response
HTTP help