title: How to fetch SMS of only one SIM in dual SIM phone?
body: <p>I am working with SMS functionalities on Android. I have successfully fetched all the SMS from the phone and I want to filter those SMS by SIM 1 and SIM 2. I have checked the columns (the query to fetch SMS is returning) but can't figure out which column indicates SIM information </p>
  
  <p>I am using this to get all  SMS </p>
  
  <pre><code>Uri uriSMSURI = Uri.parse("content://sms/");
  Cursor cur = activity.getContentResolver().query(uriSMSURI, null, "thread_id = "+thread, null, "_id DESC LIMIT "+limit +" offset "+(limit*page));
  </code></pre>
  
  <p>This returns all SMS but I want SMS from one SIM card only.</p>
  
  <p>Any help or suggestion is welcome</p>