Tuesday, January 8, 2013

Re: [android-developers] Android Network Application Service

You're not giving enough info here.

Is the server on a private network or is it world routable?

When you say "the phone is connected to the PC" do you mean tethered, reverse tethered, simple adb connection, etc?

Is the server running on the PC or elsewhere?

Is the PC network-connected to the server machine?

When the phone is not connected to the PC what network is it phone connected to?

R


On Wed, Dec 26, 2012 at 3:18 AM, Sathyam Doraswamy <sathyam.doraswamy@gmail.com> wrote:

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

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

No comments:

Post a Comment