title: How can I pass Rawquery in ContentProvider?
body: <p>How can I pass the <code>rawQuery</code> using <code>ContentProvider</code> from one application to another application? Example: <code>select max(date) from tblename</code></p>
  
  <p>Example: Query Main Activity:</p>
  
  <pre><code>private Uri CONTENT_URI = Uri.parse("content://ubra.c.apps.pro/Details");
  cursor = getContentResolver().query(CONTENT_URI, null,null, null, "datePDate DESC");
  </code></pre>
  
  <p>In <code>ContentProvider</code>:</p>
  
  <pre><code>static UriMatcher uriMatcher;
  static String PRO_NAME = "ubra.c.apps.pro";
  Uri CONTENT_URI = Uri.parse("content://" + PRO_NAME
          + "/Details");
  
  public Cursor query(Uri uri, String[] arg1, String arg2, String[] arg3,
          String arg4) {
      switch (uriMatcher.match(uri)) 
      {
      case 1:         
          CPcursor = DBConnection.query("Details",  arg1, arg2, arg3,arg2, arg2, arg4);
          break;
  </code></pre>
  
  <p>How do I use <code>rawQuery</code> here?</p>