AuxOne wrote: > The wi-fi lock sounds interesting, but I'd need it to work with the > cellular network as well. Can I lock both?
Cellular data should be always on, if I understand correctly. > Within the doWakefulWork function I instantiate a class and call one > of its methods. It ultimately creates a new Thread to make the Socket > connection. Bzzzzt. > I guess that's the issue. Ding, ding, ding! :-) > Instead of releasing the lock at > the end of WakefulIntentService.onHandleIntent, could I pass the lock > into my Thread and release it from there? IntentService in general is not designed for you to fork other threads. Remember: the IntentService component will call stopSelf() as soon as onHandleIntent() returns, if there is no other Intent queued up to be processed. Since IntentService does its work (onHandleIntent()) in a background thread, I don't know why you're forking yet another thread. I'd just do the HTTP operations in doWakefulWork(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- 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 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.

