title: In app billing: consume and purchase item then update inventory, caching?
body: <h2>Problem</h2>
  
  <p>I'm trying to implement in app billing v3, everything is working pretty nice except for one thing. After consuming or purchasing an item I do a request call to update the inventory. But the result always yields the old inventory and not the new one, with the added or removed item.</p>
  
  <p>This could be expected behavior and I do have a workaround, but it's still pretty annoying.</p>
  
  <h2>Workaround</h2>
  
  <p>My work around exists out of a special "handler/wrapper" for in-app-billing. This "handler" has a simple life cycle.</p>
  
  <p><strong>1. create (new call):</strong> Creates a new <code>IabHelper</code> object and does some magic with the publickey</p>
  
  <p><strong>2. startUp:</strong> calls the <code>startSetup</code> method from the <code>IabHelper</code> and sets a flag when successful. If successful it makes a update inventory call.</p>
  
  <p><strong>3. close:</strong> despose the IabHelper object</p>
  
  <p>The handler implements the <code>onQueryInventoryFinished</code> method, when this method is called and the result is success a local Inventory object is updated using the Inventory argument given with this method.</p>
  
  <p>So basically the handler I made has two fields a Inventory and flag for successful setup. The handler also has a custom made interface for callbacks to an activity for example.</p>
  
  <p>There are two more methods: <code>buy and consume</code>.</p>
  
  <p>After successfully buying or consuming an item I would like to update the current inventory, but this does not work as said before.</p>
  
  <p>My workaround: Remove or add the purchases manually from the local Inventory object. (this should be done in the buy or consume method.)</p>
  
  <h2>Better method?</h2>
  
  <p>Is there a better "more acceptable" way of doing this?</p>