Code example for SearchManager

Methods: getSearchableInfo

0
    public void testSearchables() { 
        SearchManager searchManager = (SearchManager)
                mContext.getSystemService(Context.SEARCH_SERVICE);
        SearchableInfo si;
 
        si = searchManager.getSearchableInfo(SEARCHABLE_ACTIVITY, false);
        assertNotNull(si);
        assertFalse(searchManager.isDefaultSearchable(si));
        si = searchManager.getSearchableInfo(SEARCHABLE_ACTIVITY, true);
        assertNotNull(si);
        assertTrue(searchManager.isDefaultSearchable(si));
        si = searchManager.getSearchableInfo(null, true);
        assertNotNull(si);
        assertTrue(searchManager.isDefaultSearchable(si));
    } 
 
    /** 
     * Tests that startSearch() can be called multiple times without stopSearch() 
     * in between. 
     */ 
Stop searching for code, let great code find you!  Add Codota to your java IDE