title: How to get last inserted RawContacts ID after newInsert into address book programactically?
body: <p>I succeeded in inserting contacts into the address book and I need to save a reference of the contact in my app. I figured that the best way to save the reference is to get the RawContacts ID itself.</p>
  
  <p>Is there a way for me to directly get the ID back from the address book right after the insertion of the the new contact? Or do I have to get every records out and compare them with my data to get the RawContacts ID?</p>
  
  <p>I do my insert using this code:</p>
  
  <pre><code>ArrayList&lt;ContentProviderOperation&gt; ops = new ArrayList&lt;ContentProviderOperation&gt;();
  int rawContactInsertIndex = ops.size();
  ops.add(ContentProviderOperation.newInsert(RawContacts.CONTENT_URI)
      .withValue(RawContacts.ACCOUNT_TYPE, null)
      .withValue(RawContacts.ACCOUNT_NAME, null)
      .withValue(RawContacts.AGGREGATION_MODE, RawContacts.AGGREGATION_MODE_DISABLED)
      .build());
  </code></pre>
  
  <p>I appreciate any inputs, be it a workaround or from the API. Thanks!</p>