AuxOne wrote:
> I have a Service/AlarmManager set to go off ever hour; as seen at:
> http://github.com/commonsguy/cw-advandroid/tree/master/SystemServices/Alarm/

That link looks strangely familiar...

> The Alarm triggers a Socket connection to communicate with a Web
> Server.

The code you link to above uses an IntentService, so the service will
shut down as soon as the work is done. Are you doing all your HTTP stuff
within the IntentService's handler?

> I'm logging the interaction to a file so I can see it later.
> When I leave the phone on my desk for a day, it seems that more often
> than not I get a "Network unreachable" error when trying to do any
> networking.
> 
> I believe it is related to how deeply the phone goes into sleep. Is
> there a special kind of lock I have to hold, or some command required
> to prep the wireless radio so that it can be ready to access the
> Internet?

You can hold a WifiLock.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android 2.x Programming Books: http://commonsware.com/books

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to