I have created an android application that runs a background service that 
does the following :

1) Asks a UDP server to send 100 packets to it

2) Receives packets in a while(true) loop

3) setSoTimeout is used so that the receive times out after 5 minutes and 
gets out of the loop
The above operations are repeated every 2 minutes. The application works 
totally fine when the phone is connected to the PC and each and every step 
is monitored using adb logcat but the application stops working when the 
phone is disconnected from the PC. Logging each step then in a file shows 
that the last step is the receive step after which the socket does not 
timeout. What could be a possible reason for it? Is there any other 
approach by which I can do the intended task at constant intervals?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to