微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何使用IntentAndroid TV打开Goog​​le搜索键盘?

如何解决如何使用IntentAndroid TV打开Goog​​le搜索键盘?

我想在我的Android TV应用程序上打开Goog​​le键盘搜索布局,因为它是认android启动器提供的。如下图所示。

enter image description here

单击此按钮将打开以下页面

enter image description here

我想知道通过我的应用在Android TV上打开此活动的意图参数是什么。单击此按钮时,也会在系统日志中显示此日志。

system_process I/ActivityManager: START u0 {act=android.intent.action.ASSIST flg=0x10a00000 cmp=com.google.android.katniss/.search.KeyboardSearchActivity (has extras)} from uid 10028


PS:我的应用程序是用户应用程序,没有任何root特权。
编辑1:
使用以下意图

  Intent intent = new Intent();
  intent.setComponent(new ComponentName("com.google.android.katniss","com.google.android.katniss.search.KeyboardSearchActivity"));

我收到此错误

W/ActivityManager: Permission Denial: starting Intent { cmp=com.google.android.katniss/.search.KeyboardSearchActivity } from ProcessRecord{4ff6631 14881:com.basic.android.basiclauncher/u0a55} (pid=14881,uid=10055) not exported from uid 10028
E/InputEventSender: Exception dispatching finished signal.
E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
E/MessageQueue-JNI: java.lang.SecurityException: Permission Denial: starting Intent { cmp=com.google.android.katniss/.search.KeyboardSearchActivity } from ProcessRecord{4ff6631 14881:com.basic.android.basiclauncher/u0a55} (pid=14881,uid=10055) not exported from uid 10028 

解决方法

urlA 因此,在not exported中,此活动集AndroidManifest.xml 这样只有root特权才能启动此操作。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。