> > What kind of service should I use? > How about a Service? I've tried creating an IntentService with a background thread that runs in > a loop to monitor the temp. The onHandleIntent() method handles the > requests from the UI for updates. Is this a reasonable way to do this? > Not really for what you've described...
If so my problem is that the IntentService shuts down after the > onHandleIntent() finishes; how do I prevent this? > The whole point of IntentService is to shut it down when it is done so you don't have to. To prevent this, don't use an IntentService... Use a Service. http://developer.android.com/reference/android/app/Service.html Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sat, Oct 6, 2012 at 9:23 PM, Deeg <[email protected]> wrote: > I'm in the process of writing an app that will act like a thermostat for > an external cooker. The Android will connect to the cooker via an IOIO, > monitor the temperature, and raise/lower the heat to keep the cooker at a > set temperature. As I see it there are two components: > > 1) Service that monitors the temps and adjusts the heat. > 2) UI that lets user view the temperature and change thermostat value. > This component makes requests to the service for data updates. > > What kind of service should I use? I've tried creating an IntentService > with a background thread that runs in a loop to monitor the temp. The > onHandleIntent() method handles the requests from the UI for updates. Is > this a reasonable way to do this? If so my problem is that the > IntentService shuts down after the onHandleIntent() finishes; how do I > prevent this? > > Thanks for any help. > > -- > 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 -- 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

