编辑
原始帖子说我无法通过说“打开测试”来打开测试。反复尝试表明它确实有效……有时。也许90%的时间说“开放测试”会打开我的测试应用程序,但其他时候它会进行媒体搜索。我可以看到google正在转录的文字,因此这两种不同的结果并不是由语音转文字的错误引起的。
原始帖子
在Android TV上,我可以通过单击 Remote 的麦克风按钮并说“打开android:label
的application
元素中AndroidManifest.xml
的值。
我已经尝试过使用基本的Android Studio生成的电视进行投影,因此我的AndroidManifest.xml
如下所示:<?xml version="1.0" encoding="utf-8"?>
<manifest package="<my package>"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
<uses-feature
android:name="android.software.leanback"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="test"
android:theme="@style/Theme.Leanback">
<activity
android:name=".MainActivity"
android:icon="@drawable/app_icon_your_company"
android:label="test"
android:logo="@drawable/app_icon_your_company"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
如何添加此功能?
我有两个想法:在搜索中没有找到Android Manifest属性,或者该功能仅适用于Play商店中可用的应用程序。 (如果我未安装Dailymotion时使用麦克风说“open dailymotion”,则最主要的结果是指向Play商店中该应用程序的链接,这使我认为此功能依赖于被Google编制索引。)
最佳答案
您可能要使用系统语音操作https://developers.google.com/voice-actions/system/
https://www.youtube.com/watch?v=OW1A4XFRuyc&list=PLOU2XLYxmsIJDPXCTt5TLDu67271PruEk
关于android - 如何使用语音打开Android TV应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33242485/