title: Search suggestions from different tables in different activities
body: <p>Hi i have followed <a href="http://developer.android.com/guide/topics/search/adding-custom-suggestions.html">official android guideline</a> for enabling search and search suggestions. I works very well but the problem is that it only search from one Database Table. </p>
  
  <p>I have three tables and three Activities with the name <code>“BirthdayWisher_Table”</code>, <code>“Tasks_Table”</code>, <code>“Events_Table”</code> and <code>“BirthdayWisher_Activity”</code>, <code>“Tasks_Activity”</code>, <code>“Events_Activity”</code> respectively. </p>
  
  <p>I want that when the user is in the “BirthdayWisher_Activity” and press the Search menu item my app should search data from the “BirthdayWisher_Table” and when the user is in the “Tasks_Activity” and press the Search menu item my app should search data from the “Tasks_Table”. </p>
  
  <p>But it seems impossible to do so for me. </p>
  
  <h3>SearchAble Configuration file</h3>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;searchable xmlns:android="http://schemas.android.com/apk/res/android"
      android:hint="@string/search"
      android:label="@string/app_name"
      android:searchSettingsDescription="@string/search_the_entire_app_"
      android:searchSuggestAuthority="com.beaconimpex.assistant.app.ContentProvider"
      android:searchSuggestIntentAction="android.Intent.action.VIEW"
      android:searchSuggestIntentData="content://com.beaconimpex.assistant.app.ContentProvider/BirthdayWishTable"
      android:searchSuggestPath="BirthdayWishTable"
      android:searchSuggestSelection=" suggest_text_1 LIKE  ? "
      android:searchSuggestThreshold="1" &gt;
  
  &lt;/searchable&gt;
  </code></pre>
  
  <h3>Here is how i am associating my searchAble activity</h3>
  
  <pre><code>    &lt;activity
          android:name="com.beaconimpex.assistant.SearchAppActivity"
          android:label="@string/title_activity_search_app" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.SEARCH" /&gt;
          &lt;/intent-filter&gt;
  
          &lt;meta-data
              android:name="android.app.searchable"
              android:resource="@xml/searchable" /&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <h3>It is working very well for BirthdayWisherTable (because I have specified)</h3>
  
  <pre><code>android:searchSuggestIntentData="content://com.beaconimpex.assistant.app.ContentProvider/BirthdayWishTable"
  android:searchSuggestPath="BirthdayWishTable"
  </code></pre>
  
  <h3>My Content Provider</h3>
  
  <pre><code>public class AssistantContentProvider extends ContentProvider {
  public static final String DATABASE_NAME = "gcuf__dB";
  public static final int DATABASE_VERSION = 99;
  public static final String AUTHORITY = "com.beaconimpex.assistant.app.ContentProvider";
  
  SQLiteDatabase db;
  private DBOpenHelper dbHelper;
  
  private static final UriMatcher sURIMatcher = new UriMatcher(
          UriMatcher.NO_MATCH);
  private static final int SEARCH_SUGGEST = 12345;
  static {    
  
      sURIMatcher.addURI(AUTHORITY, BirthdayWisher.TABLE_NAME + "/"
              + SearchManager.SUGGEST_URI_PATH_QUERY, SEARCH_SUGGEST);
      sURIMatcher.addURI(AUTHORITY, BirthdayWisher.TABLE_NAME + "/"
              + SearchManager.SUGGEST_URI_PATH_QUERY + "/*", SEARCH_SUGGEST);     
  }
  @Override
  public Cursor query(Uri uri, String[] projection, String selection,
          String[] selectionArgs, String sortOrder) {
  
      Log.i(MyConstants.LOG_TAG, "-----Query method is called with URI: "
              + uri.toString());
  
      switch (sURIMatcher.match(uri)) {       
      case SEARCH_SUGGEST:
          Log.i(MyConstants.LOG_TAG, "URI Search Suggest");
          if (selectionArgs != null &amp;&amp; selectionArgs.length &gt; 0
                  &amp;&amp; selectionArgs[0].length() &gt; 0) {
              // the entered text can be found in selectionArgs[0]
              // return a cursor with appropriate data
              return queryCursor(uri, BirthdayWisher.TABLE_NAME,
                      BirthdayWisher.allColumns, selection,
                      new String[] { "%" + selectionArgs[0].toLowerCase()
                              + "%" }, null);
          } else {
              // user hasn't entered anything
              // thus return a default cursor
              Log.i(MyConstants.LOG_TAG,
                      "User has not entered anything in the searchBox.");
              return null;
          }
  
      default:
          throw new IllegalArgumentException("Unsupported URI: " + uri);
      }
  
  
  
         }
  }
  </code></pre>
  
  <p><strong>But how can i provide custom search suggestions for each Activity by fetching data from related tables using this method?</strong></p>