Send text input to Android TV

by radiocollector12

Hi everyone, as we all know the Android TV remote control app can be used to type in text to Android TV, I was wondering if there was any way to do this outside of the app, in terminal preferably. Can anyone who is familiar with Android TV help on how this could be done?

Any guidance would be greatly appreciated!

EDIT: I see this website here might be useful (I have a Sony TV) https://pro-bravia.sony.net/develop/integrate/rest-api/spec/service/appcontrol/v1_0/setTextForm/index.html but I have no idea how to use it, can someone help me out?

EDIT 2: Found how to do it on Sony TV's with a keyboard open on the TV:

curl -H "Content-Type: application/json" \

-H "X-Auth-PSK: [PSK GOES HERE]" \

-X POST \

-d '{"id": 20, "method": "setTextForm", "version": "1.0", "params": ["hello world"]}' \

http://[TV IP HERE]/sony/appControl

vandalous1

Why not just use a Bluetooth or wireless USB keyboard?

Pfremm

Haven’t personally tried it but suspect with adb you could. This article I think gets you on the right path.

https://stackoverflow.com/questions/25782199/does-adb-shell-input-text-simulate-software-keyboard-input/25910670

FoferJ

You can also do it via this web tool once you configure it with your TV’s IP address

http://www.aczoom.com/tools/sony-tv-remote/sony-tv.html

blurance
arghness

There used to be 3rd pary remote controls (maybe there still are), so there must have been some way to do it generically for all Android TV devices, but it might need a specific Android API rather than something open from specs.

kleinstadt-techno

adb shell input text "hello there :-)"

abstruzero

You can use android tv app in play store. That makes your phone remote controller for android tvs. I'm using that without any problem.