Skip to content Skip to sidebar Skip to footer

Receive Search From Google Now

So I tried to implement this - The fastest route between voice search and your app What i have so far is... In manifest:

Solution 1:

Per the blog post, queries are in the format:

Ok Google, search pizza on Eat24

Ok Google, search for hotels in Maui on TripAdvisor

You'll note the bolded portion is the search term your app receives when a successful voice search in the correct format is sent to your app.

Solution 2:

Also, the way we check for Intent also may be different. Only this worked for me. As the intent mentioned in the documentation is this.

Intent intent = getIntent();
if (Intent.ACTION_SEARCH.equals(intent.getAction())
        || "com.google.android.gms.actions.SEARCH_ACTION".equals(intent.getAction())) {
    externalQuery = intent.getStringExtra(SearchManager.QUERY);
    //String xquery = query;
}

Post a Comment for "Receive Search From Google Now"