+ handleIntent(getIntent());
+ }
+
+
+ @Override
+ protected void onNewIntent(Intent intent) {
+ setIntent(intent);
+ handleIntent(intent);
+ }
+
+
+ private void handleIntent(Intent intent) {
+ // Verify the action and get the query
+ if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
+ String query = intent.getStringExtra(SearchManager.QUERY);
+ doMySearch(query);
+ }
+ }
+
+ private void doMySearch(String query) {
+ // TODO implement
+ Toast.makeText(this, "You want to search for [" + query + "]", Toast.LENGTH_SHORT).show();