简体   繁体   English

如何触发 com.google.android.gms.actions.SEARCH_ACTION Google Now 操作进行测试?

[英]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 .我正在构建一个 Android 应用程序,并希望将使用语音搜索的功能与本博客文章中所述的 Google Now Actions 集成。 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.?在我将应用推送到 Play 商店之前,有没有办法测试我的意图过滤器( com.google.android.gms.actions.SEARCH_ACTION )、搜索表达式处理等? 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>

Yes, you can use adb activity manager to trigger the activity using the syntax below:是的,您可以使用adb活动管理器使用以下语法触发活动:

adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION -e query foo < app package name here > adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION -e query foo <此处的应用程序包名称>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 接收广播Intent时出错{act = com.google.android.gms.appinvite.intent.action.INVITE_SENT - Error receiving broadcast Intent { act=com.google.android.gms.appinvite.intent.action.INVITE_SENT 无法导入com.google.android.gms.actions.ReserveIntents - Cant Import com.google.android.gms.actions.ReserveIntents 如何在Android应用程序com.google.android.gms.maps.GoogleMap中导入此程序包(库) - how can i import this packages (Libraries) in my android application com.google.android.gms.maps.GoogleMap 如何修复软件包名称为“ com.google.android.gms”的多个库? - How I Can fix more than one library with package name 'com.google.android.gms'? 如何解决“未找到课程'com.google.android.gms.auth.GoogleAuthUtil'”错误? - How can I resolve the “Didn't find class 'com.google.android.gms.auth.GoogleAuthUtil'” error? 如何使用MediaRecorder和com.google.android.gms.vision.CameraSource录制视频? - How can I Record Video Using MediaRecorder and com.google.android.gms.vision.CameraSource? 谷歌现在响应Android Wear行动 - Google now in response to android wear action 使用“com.google.android.gms.maps.GoogleMap”,我可以像在 maps.google.com 上一样绘制路线吗? - Using “com.google.android.gms.maps.GoogleMap”, can I draw a route as I can on maps.google.com? 我可以在使用gradle时从AndroidManifest中删除com.google.android.gms.version吗? - Can I remove com.google.android.gms.version from AndroidManifest when I use gradle? 无法导入 com.google.android.gms.location.LocationServices - Can't Import com.google.android.gms.location.LocationServices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM