search in 2.3

satya - Thursday, November 25, 2010 3:44:02 PM

Previous notes on Android search

Previous notes on Android

satya - Thursday, November 25, 2010 4:18:52 PM

search differences android 2.2

search differences android 2.2

Search for: search differences android 2.2

satya - Thursday, November 25, 2010 4:25:48 PM

A reference to where search types are discussed

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.

satya - Friday, November 26, 2010 8:15:55 AM

Indeed search has changed


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

satya - Friday, November 26, 2010 8:16:28 AM

Android users guide has a section on search including voice

Android users guide has a section on search including voice

satya - Friday, November 26, 2010 8:20:38 AM

voice search seem to have a set of predefined commands

voice search seem to have a set of predefined commands

satya - Friday, November 26, 2010 8:21:02 AM

can I use android voice search as a replacement to text

can I use android voice search as a replacement to text

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

satya - Friday, November 26, 2010 8:21:43 AM

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

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

satya - Friday, November 26, 2010 9:06:44 AM

onSearchRequested

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

satya - Friday, November 26, 2010 9:08:40 AM

startsearch broken

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

satya - Friday, November 26, 2010 9:19:33 AM

activity.java netmite

activity.java netmite

Search for: activity.java netmite

satya - Friday, November 26, 2010 9:19:53 AM

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

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

satya - Friday, November 26, 2010 9:20:47 AM

what onSearchRequested does


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

satya - Friday, November 26, 2010 9:52:02 AM

startSearch args


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

satya - Friday, November 26, 2010 9:52:46 AM

See if this activity is any different

See if this activity is any different

satya - Friday, November 26, 2010 9:55:13 AM

Notice how the global search is disabled by default

Not sure in what release....

satya - Sunday, November 28, 2010 9:41:46 AM

Change in what shows up as your search context or searchable item

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

satya - Monday, November 29, 2010 10:47:42 AM

illegal argument searchsuggestionprovider

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

satya - Monday, November 29, 2010 10:54:41 AM

searchsuggestionsprovider

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

satya - Monday, November 29, 2010 10:54:57 AM

here is the basic article on the subject

here is the basic article on the subject

satya - Monday, November 29, 2010 10:58:17 AM

The way you specify both modes are


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.

satya - Wednesday, December 01, 2010 9:58:32 AM

A search activity with a definition of searchable.xml is enabled for search by default

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.

satya - Wednesday, December 01, 2010 9:59:03 AM

android.app.default_searchable *

android.app.default_searchable *

Search for: android.app.default_searchable *

satya - Wednesday, December 01, 2010 10:01:10 AM

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

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

satya - Wednesday, December 01, 2010 10:02:48 AM

Here is a source reference to Searchables.java

Here is a source reference to Searchables.java

satya - Wednesday, December 01, 2010 10:50:03 AM

with this change...

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.

satya - Wednesday, December 01, 2010 10:53:22 AM

docuemntation for startSearch

docuemntation for startSearch

satya - Wednesday, December 01, 2010 10:58:17 AM

The four arguments of this method

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.

satya - Wednesday, December 01, 2010 10:59:55 AM

startsearch globalSearch

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