Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I trigger the com.google.android.gms.actions.SEARCH_ACTION Google Now action for testing?

I am building an Android app and would like to integrate the ability to search using voice with Google Now Actions as described in this blog post. Before I push the app to the Play Store, is there a way to test my intent filter (com.google.android.gms.actions.SEARCH_ACTION), search expression handling, etc.? I've followed the documentation and included the intent filter as below:

<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>
like image 549
Jarek Wilkiewicz Avatar asked Nov 09 '14 03:11

Jarek Wilkiewicz


1 Answers

Yes, you can use adb activity manager to trigger the activity using the syntax below:

adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION -e query foo <app package name here>

like image 84
Jarek Wilkiewicz Avatar answered Nov 13 '22 09:11

Jarek Wilkiewicz