Injecting text simultaneously to multiple displays

154 views
Skip to first unread message

Utkarsh

unread,
Oct 8, 2020, 7:14:50 PM10/8/20
to android-platform

Hi all,

I am looking at a way to inject text simultaneously to two (or more) displays: an application on the main display, and a different application on a virtual display.

I have experimented with using InputManager.injectInput on the virtual display, but when I the I inject the text, I am not able to type anything on the main display. Similarly when I tried attaching a physical keyboard (emulated virtually), the text gets injected to where the focus is present.

Any suggestions on how to solve this problem? I am quite sure this is solved in Android Auto and was wondering if there are any pointers in Android Auto code that I can refer to?

Thanks!

--
Regards,
Utkarsh
Reply all
Reply to author
Forward
0 new messages