title: Need sample Android REST Client project which implements Virgil Dobjanschi REST implementation pattern
body: <p>I want to build a REST Client on an android phone.</p>
  
  <p>The REST server exposes several resources, e.g. (GET)</p>
  
  <pre><code>http://foo.bar/customer      List of all customer
  http://foo.bar/customer/4711    The customer with id 4711
  http://foo.bar/customer/vip     List of all VIP customer
  
  http://foo.bar/company           List of all companys
  http://foo.bar/company/4711     The company with the ID 4711
  http://foo.bar/company/vip      List of all VIP companys
  </code></pre>
  
  <p>I (think) I know how to talk to the REST server and get the information I need. I would implement a REST Client class with an API like this</p>
  
  <pre><code>public List&lt;Customer&gt; getCustomers();
  public Customer getCustomer(final String id);
  public List&lt;Customer&gt; getVipCustomer();
  
  public List&lt;Company&gt; getCompanies();
  public Customer getCompany(final String id);
  public List&lt;Customer&gt; getVipCompanies();
  </code></pre>
  
  <p>Referred to the presentation "<a href="http://dl.google.com/googleio/2010/android-developing-RESTful-android-apps.pdf" rel="nofollow noreferrer">Developing Android REST client applications</a>" from Virgil Dobjanschi I learned that it is no good idea to handle the REST request in an Worker Thread of the Activity. Instead I should use the <a href="http://developer.android.com/reference/android/app/Service.html" rel="nofollow noreferrer">Service</a> API.</p>
  
  <p>I like the idea of having a Singleton ServiceHelper which binds to a (Local) Service but I am afraid that I did not understand the Service concept correct.</p>
  
  <p>For now I do not understand how to report a REST call result (done asynchrounous in a Service) back to the caller Activity. I also wonder if I need ONE Service which handles all REST requests (with different return types) or if I need a dedicated service for each REST request.</p>
  
  <p>Probably I have many other understanding problems so the best thing for me would be a <strong>sample application</strong> which meets my needs. My use case is not unusual and I hope there is in example application out there.</p>
  
  <p><strong>Would you please let me know!</strong></p>
  
  <p>Any other suggestions which points me in the correct implementation direction are also helpful (Android API-Demo does not match my use case).</p>
  
  <p>Thanks in advance.</p>
  
  <p>Klaus</p>
  
  <p><strong>EDIT</strong>: Similar Topics found on SO (after posting this) which lead me in the direction I need (minimizing the complex "Dobjanschi pattern"):</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3197335/android-restful-api-service">Android: restful API service</a></li>
  </ul>