title: ContentProvider/ContentResolver Query Sorting by ID by default
body: <p>I am working on an application that stores everything in a database and it is accessed using a ContentProvider. My scenario is as follows:</p>
  
  <ul>
  <li>I make a web call and receive a list of integers which represent the ids of the objects I need to retrieve from my database on the device. </li>
  <li><p>I make a call to ContentResolver.query() with the following Selection: </p>
  
  <p>Selection: _id=? OR _id=? OR _id=?</p>
  
  <p>Selection Ids: 30; 165; 149;</p></li>
  <li><p>So, I need to get all items where the id is either 30, 165, or 149. And I need them <em>in that exact order</em>. </p></li>
  </ul>
  
  <p>This is the exact call I am making on the ContentResolver: </p>
  
  <pre><code>Cursor cursor = mActivity.getContentResolver().query(myUri, null, selection, selectionIds, null);
  </code></pre>
  
  <p>As you can see, I do not pass in any sorting. However, the result gives me a Cursor with the order being the following: 30, 149, 165. So, it appears it is defaulting the sorting by _id even though I do not specify any sort order. My question is, does anyone know of a way to stop this from happening? </p>