Skip to content Skip to sidebar Skip to footer

How To Pass Text From Activity To Google Now Search In Android

I have an activity with EditText and Button. When user is pressing the button i need to launch Google Now Search from my Activity and pass a text from EditText to make Google Now s

Solution 1:

Try this

Stringquery= editText.getText().toString();
Intentintent=newIntent(Intent.ACTION_WEB_SEARCH);
intent.setClassName("com.google.android.googlequicksearchbox", "com.google.android.googlequicksearchbox.SearchActivity");
intent.putExtra("query", query);
startActivity(intent);

you can get more info here

Post a Comment for "How To Pass Text From Activity To Google Now Search In Android"