Is there a way to issue a voice command something like:
OK GOOGLE ASK XXX Some App Specific Question or Command
And have it launch \"APP\" with the recognize
To integrate "OK Google" in your app is easy with following two steps.
First we need to declare in the manifest File
/>
Now we need to declare in the Activity onCreate
if (getIntent().getAction() != null && getIntent().getAction().equals("com.google.android.gms.actions.SEARCH_ACTION")) {
query = getIntent().getStringExtra(SearchManager.QUERY);
Log.e("Query:",query); //query is the search word
}
User should follow the syntax to detect by "Ok google", When a user says, “OK Google, search for phrase on app name”, Google first checks if there is an app called app name installed which has declared itself to be capable of handling such queries.