I am trying to create a searchable activity however when I get to this point, I have the red squiggly under SearchManager (in Eclipse) and it says:
SearchManager cannot be resolved to a variable
It gives me 8 quick fixes but none if them are helpful. Am I missing something easy? I am building against 4.0, my minSDK is 7 and targetSDK is 13. T
private void handleIntent(Intent intent) {
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
// handles a search query
String query = intent.getStringExtra(SearchManager.QUERY);
doMySearch(query);
}
}
http://developer.android.com/guide/topics/search/search-dialog.html#SearchDialog
That comes under the Google APIs section. Change the build target to Google APIs under Project Properties > Android.