No route to host running off battery with WIFILock

by Andrew Prunicki » Fri, 02 Jan 2009 05:44:24 GMT


Sponsored Links
 Update.

I have had success maintaining the WIFI connection by using a wakelock
(partial) in combination with a wifilock.  Now my app successfully maintains
the wifi connection even when the screen goes black - albeit at cost to
battery life.

If anyone has any other insights they would like to share, those would be
most welcome.





--~--~---------~--~----~------------~-------~--~----~



No route to host running off battery with WIFILock

by prunicki » Fri, 02 Jan 2009 05:44:25 GMT


 I have written a small app that acquires a WIFILock.  Every 15 seconds
it does a small http request.  If the G1 is running on battery and the
screen saver kicks on it will ultimately result in "No route to host"
- despite the fact that the connection appears to be up when checking
the WifiManager and ConnectivityManager.  If I then pick up the
handset and attempt to access the internet (browser, email, etc.),
nothing is accessible.  The only way to make things accessible is to
release the lock, let the device go to idle (which releases the
radio), and then wake it up, thus reconnecting WIFI, and internet
access is again possible.

Now if I leave it plugged in, then it is able to continuously make the
request.  Interestingly, if I ping the device repeatedly from my
desktop, it seems to be able to continue to make requests (although I
haven't taken the time yet to be certain).

The WIFILock as it is currently working is not of much use.  I have
even tried to re-connect in this case, or toggle the WIFI on and off,
but neither of these work.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. App released but only tested using the emulator. Could you please test it to me?

Hi all,

After spending some time learning about Androids SDK Ive finally
"finished" a first version of my first app: a metronome.
Its a simple app but Ive faced some problems with AudioTrack, most
trying to syncronize the audio with changes on the UI. In the end I
did all my tests using the Android Emulator (1.6 and 2.1) since I don
t have an Android device right now.
Ive posted this first version on some sites to get an initial
feedback about it: how it works, how is the syncronization between
audio and UI, how easy it is to understand the UI, if its stable,
etc.
I would appreciate if you could give me some feedback:

https://slideme.org/application/mobile-metronome
http://andappstore.com/AndroidApplications/apps/Mobile_Metronome

I will post it on Android market as soon as I confirm its stable and
working properly.

Thanks,
Gabriel Simes

-- 

2. stupid android question

I really like the retro clock/calendar/weather widget I see pictured on
all of the HTC/Sense handsets but doesn't seem to be an option on my
Motorola Droid. Does anyone know if there's a similar package for the
Droid running 2.1?

Craig

-- 

3. Exception: Parcel: Unable to marshal value?

4. configuring the platform

5. Freezing user space processes

6. Please help!!! include Prebuilt library to the main android build (building android from complete source)

7. Problem Upgrade Spica