0

I am developing an application to control the secondary display using the buttons in my application. My app will run on the primary screen and I want to send the navigation and selection key events to the secondary screen through my controller app on the primary screen.

Notes: These two displays are external displays and have their own screen id.

Scenario

  • can you please share some piece of code? – Aditya Nandardhane Sep 21 '22 at 12:31
  • I think code pieces make you confused, so I attached some images to describe scenario cleary. – suspended_null Sep 21 '22 at 12:33
  • @AdityaNandardhane If I find a way to send key events to secondary connected display, my issue will solved. – suspended_null Sep 21 '22 at 12:49
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 21 '22 at 14:50
  • "I want to send the navigation and selection key events to the secondary screen" -- that does not make any sense. A secondary screen has no means of handling "navigation and selection key events". An *app* might handle those things. But, we do not know what you are doing with this secondary screen. I suggest that you edit your question to explain **in detail** what it is that you are doing with this secondary screen and what exactly you are trying to accomplish. – CommonsWare Sep 21 '22 at 15:00
  • I am looking for different approaches before I code. To make it clear, I have some media apps running on secondary display which is connected my primary display. So, I just wanted to control these apps on my application working like Android TV. So, there are some approaches come to my mind which are sending key event another active application (might be netflix, youtube whatever). When I send inject key events through adb shell, I can easily navigate opened app on secondary display. So, I am trying to build an app behaves like injecting key to focused apps. – suspended_null Sep 21 '22 at 15:45

0 Answers0