简体   繁体   English

Android TV远程应用

[英]Android TV remote app

Guys i have some problem i am working on android TV remote control app using WiFi direct. 伙计们,我有一些问题,我正在使用WiFi Direct在Android TV远程控制应用程序上工作。 For this purpose I made 2 applications: one for TV (server) and one for mobile (client). 为此,我提出了两种应用程序:一种用于电视(服务器),另一种用于移动设备(客户端)。 I connect both devices using WiFi direct. 我使用WiFi直接连接两个设备。 I send string from client to server successfully like "change channel". 我成功地将字符串从客户端发送到服务器,如“更改频道”。 Now the problem is i want server application change TV channel on the behave of receiving strings. 现在的问题是我希望服务器应用程序更改电视频道接收字符串的行为。 I search a lot but i didn't find any api that used for this purpose. 我搜索了很多,但没有找到用于此目的的任何api。 Looking forward your respond guys 期待您的回应

The easiest way is to inject keyevent. 最简单的方法是注入keyevent。 You need to use private apis to do that, check also permissions. 您需要使用私有API来做到这一点,还请检查权限。 Have a look to this topic: How can I send key events in android? 看一下这个主题: 如何在android中发送按键事件? [edit] : It is not possible to inject input event on android P [edit]:无法在android P上注入输入事件

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM