应用已发布到Google Play上,但无法使用Google语音操作 [英] App already published onto Google Play but unable to use Google Voice Actions

查看:174
本文介绍了应用已发布到Google Play上,但无法使用Google语音操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在已经发布到Google Play(私人频道)并下载到手机上的应用程序中成功使用Google System语音操作在应用程序中搜索"(com.google.android.gms.actions.SEARCH_ACTION).

I am unable to successfully use the Google System Voice Actions "Search in App" (com.google.android.gms.actions.SEARCH_ACTION) on an app that I have already published onto Google Play (Private Channel) and downloaded onto my phone.

在匹配意图过滤器之后,带有来自搜索操作的额外查询的意图将传递给MainActivity.

The intent with the query extra from the search action is to be passed on to MainActivity after matching the intent filter.

在发布应用程序之前,我已经使用下面的adb命令完美测试了该应用程序:

Before publishing the app, I have already tested the app using the adb command below which works perfectly:

adb shell am start -a "com.google.android.gms.actions.SEARCH_ACTION" --es query "[query]" -n "com.testapp/.MainActivity"

下面是我的Android清单,其中包含意图过滤器:

Below is my Android manifest which contains the intent filters:

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.testapp" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="23" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:name=".app.AppController"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:allowTaskReparenting="true">

        <meta-data
            android:name="com.google.android.gms.version" 
            android:value="@integer/google_play_services_version" />

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:exported="true"
            android:launchMode="singleTop" >

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

            <intent-filter>
                <action android:name="com.google.android.gms.actions.SEARCH_ACTION" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.VOICE" />
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.VOICE" />
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.VOICE" />
            </intent-filter>

            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />

            <meta-data
                android:name="android.app.default_searchable"
                android:value=".MainActivity" />

        </activity>

    </application>

</manifest>

我是否正确设置了Google语音操作所需的意图过滤器?如果是,为什么不能使用Google App在我的应用程序中搜索关键字?还是有其他考虑因素(例如(仅出于个人猜测)):Google应用缓存/处理"应用内容/意图过滤器等所需的时间,应用名称和搜索关键字不够唯一",或事实而不是将应用分发到专用渠道上?

Are my intent filters required for Google Voice Actions set up correctly, and if so, why did using Google App to search for keywords within my app not work? Or are there any other considerations such as (some personal guesses only): time needed for Google App to "cache/process" app contents/intent filters etc., the app name and search keywords not being "unique" enough, or the fact that the app being distributed onto a Private Channel instead?

希望所有成功实施Google语音操作的人可以共享并提供一些意见.

Hoping for anyone who has successfully implemented Google Voice Actions before to share and provide some input.

推荐答案

我从

使用您特定应用名称的语音操作要求您将应用公开放置在应用商店中,以便该名称可以被Google索引.

(如果准确的话)将暗示Google将需要时间来关联应用名称,以使命令在[应用名称]中搜索[关键字]"的命令获得成功,即使在该应用已发布.如果该应用是公开的,而不是在Google Play私人频道中,则这样做会更加有效.

which, if accurate, would imply that Google will need time to associate the name of the app for the command "search for [keyword] in [app name]" to be successful, even after the app has been published. This would be more effective if the app is public and not in a Google Play private channel.

这篇关于应用已发布到Google Play上,但无法使用Google语音操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆