Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to integrate Google Now into your app (for a quick demo, view: https://www.youtube.com/watch?v=_UBvl_edu1o)
<activity
android:name=".SearchActivity">
<intent-filter>
<action android:name="com.google.android.gms.actions.SEARCH_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
/**
* Somewhere in your activity
*/
String query = "";
if (getIntent().getAction() != null && getIntent().getAction().equals("com.google.android.gms.actions.SEARCH_ACTION")) {
query = getIntent().getStringExtra(SearchManager.QUERY);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.