title: Android: Single service with multiple threads
body: <p>I am building an application which performs 3 tasks concurrently.-></p>
  
  <ol>
  <li><p>Listening to new devices.</p></li>
  <li><p>A proxy to interact with the device in real-time.</p></li>
  <li><p>A set of business Logic to be run on the data provided by the device proxies.</p></li>
  <li><p>And of couse a Main UI (thread)</p></li>
  </ol>
  
  <p>I want task 1,2 and 3 to run even when the application is in the <strong>background</strong>.</p>
  
  <p>What should be done?</p>
  
  <ol>
  <li><p>Using 3 services, one for each.. (apparently not practical).</p></li>
  <li><p>Can a single service support all the tasks.( one service with multiple threads sort of design)?</p></li>
  </ol>
  
  <p>Please help.</p>
  
  <p>Basically, What i intend to ask is that is a model available to perform all 3 tasks even if the application is in the <strong>background</strong>? If service is the answer, how can it be implemented in an efficient way without putting too much load on the system i.e. using 3 services?</p>