search in 2.3

Previous notes on Android

search differences android 2.2

Search for: search differences android 2.2

A reference to where search types are discussed

Here is a quote from this article

There are also some widget changes in Android 2.2. The standard Google search widget has a new trick that we feel makes it much more useful. When you add the widget, Android will ask you what category you'd like it to search by default. You can choose from All, Web, Apps, Contacts, or Twitter (which is integrated with 2.2). These are just the default options. By going into your system's search settings you can allow various apps access to this widget. Apps like Google Sky Map, Kindle, and Mint can be added to the widget. At any time you can tap the icon on this widget to change the search type. Hitting the hard search button will also offer the option to access all these search types. In Android 2.2, Google has made the search functionality even better, if you can believe that.


It is now a widget
typing anything in it will open a proper search activity
More results seem to be gone
suggestion providers become a drop down to choose
suggestion providers become search types

Android users guide has a section on search including voice

voice search seem to have a set of predefined commands

can I use android voice search as a replacement to text

Search for: can I use android voice search as a replacement to text

How can you hook up your own search provider for android voice search

Search for: How can you hook up your own search provider for android voice search

onSearchRequested

Search Google for: onSearchRequested

Search Android Developers Group for: onSearchRequested

Search Android Beginers Group for: onSearchRequested

Search Google Code for: onSearchRequested

Search Android Issues Database for: onSearchRequested

startsearch broken

Search Google for: startsearch broken

Search Android Developers Group for: startsearch broken

Search Android Beginers Group for: startsearch broken

Search Google Code for: startsearch broken

Search Android Issues Database for: startsearch broken

activity.java netmite

Search for: activity.java netmite

source code of activity.java to see why it doesnt work


public boolean onSearchRequested() {
        startSearch(null, false, null, false); 
        return true;
    }

"example search text"
boolean: highlight or no (false)
some kind of a bundel (null)
true will invoke global search

See if this activity is any different

Not sure in what release....

Previously this used to be the name of the application in which the search provider is available. In the releases 2.2 and above this is the name of the "search activity" for which there is a corresponding searchable.xml

illegal argument searchsuggestionprovider

Search Google for: illegal argument searchsuggestionprovider

Search Android Developers Group for: illegal argument searchsuggestionprovider

Search Android Beginers Group for: illegal argument searchsuggestionprovider

Search Google Code for: illegal argument searchsuggestionprovider

Search Android Issues Database for: illegal argument searchsuggestionprovider

searchsuggestionsprovider

Search Google for: searchsuggestionsprovider

Search Android Developers Group for: searchsuggestionsprovider

Search Android Beginers Group for: searchsuggestionsprovider

Search Google Code for: searchsuggestionsprovider

Search Android Issues Database for: searchsuggestionsprovider

here is the basic article on the subject


final static int MODE = DATABASE_MODE_2LINES | DATABASE_MODE_QUERIES;
or
final static int MODE = DATABASE_MODE_QUERIES;

//The following is wrong
final static int MODE = DATABASE_MODE_2LINES

you will get an illegal argument exception otherwise.

The other activities need to have android.app.default_searchable to enable them for search either inside their definition or at the whole application level.

android.app.default_searchable *

Search for: android.app.default_searchable *

Looks like the value of * is deprecated for indicating a global activity

Here is a source reference to Searchables.java

There is no good way to say globally, for all activities, in an application invoke the global search on search key press. This used to be the case with the "*". I am sure there are reasons. But thats what it is.

docuemntation for startSearch

initialQuery

initialQuery Any non-null non-empty string will be inserted as pre-entered text in the search query box.

selectInitialQuery

If true, the intial query will be preselected, which means that any further typing will replace it. This is useful for cases where an entire pre-formed query is being inserted. If false, the selection point will be placed at the end of the inserted query. This is useful when the inserted query is text that the user entered, and the user would expect to be able to keep typing. This parameter is only meaningful if initialQuery is a non-empty string. appSearchData An application can insert application-specific context here, in order to improve quality or specificity of its own searches. This data will be returned with SEARCH intent(s). Null if no extra data is required.

globalSearch

If false, this will only launch the search that has been specifically defined by the application (which is usually defined as a local search). If no default search is defined in the current application or activity, global search will be launched. If true, this will always launch a platform-global (e.g. web-based) search instead. Any non-null non-empty string will be inserted as pre-entered text in the search query box.

selectInitialQuery If true, the intial query will be preselected, which means that any further typing will replace it. This is useful for cases where an entire pre-formed query is being inserted. If false, the selection point will be placed at the end of the inserted query. This is useful when the inserted query is text that the user entered, and the user would expect to be able to keep typing. This parameter is only meaningful if initialQuery is a non-empty string.

appSearchData

An application can insert application-specific context here, in order to improve quality or specificity of its own searches. This data will be returned with SEARCH intent(s). Null if no extra data is required.

globalSearch

If false, this will only launch the search that has been specifically defined by the application (which is usually defined as a local search). If no default search is defined in the current application or activity, global search will be launched. If true, this will always launch a platform-global (e.g. web-based) search instead.

startsearch globalSearch

Search Google for: startsearch globalSearch

Search Android Developers Group for: startsearch globalSearch

Search Android Beginers Group for: startsearch globalSearch

Search Google Code for: startsearch globalSearch

Search Android Issues Database for: startsearch globalSearch