title: How to trigger force download from content provider while using LoaderCallbacks in Android
body: <p>I'm implementing the Content Provider API from Virgil Dobjanschi by making the requests from the Content Provider. I've looked <a href="https://youtu.be/xHXn3Kg2IQE?t=2319" rel="nofollow">here</a> for instructions. In the presentation it says that you can send a flag (force download) through the URI and while showing the current data in the database, you also trigger a refresh request.</p>
  
  <p>It all works good but if you implement LoaderCallbacks with CursorLoaders and send the CursorLoader with the force download flag, after data is updated in the database, the CursorLoader requeries with the same URI that has that flag (spanning new requests). </p>
  
  <p>This results into infinite loops.
  I'm using and IntentService for the network requests. I'm storing a queue of requests that is sent to the Service, and removing it when the request, parsing and insertion in the db is finished. This is not enough. If a user changes orientation it triggers another request. </p>
  
  <p>I user restartLoader() to which I send a bundle with a force download flag. If the user wants to refresh I do a restartLoader() with the new bundle and recreate the URI by adding a queryParameter.</p>
  
  <p>Is there a best practice for this?</p>