• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Sending button pressed action to another running applications

TienDat

Lurker
Jan 2, 2021
6
2
Dear,

We are working on an application, which can run in parallel with other applications (most likely camera apps). The main goal of our application is: to listen to button press action on a bluetooth paired device, then to send a signal to the RUNNING (on screen) camera app to take the picture. This mean our app serves ONLY as a remote invoker for the camera app to take the picture, whenever user clicks the remote button.

We all know that most of the camera apps listen to action on volume keys (up and down) to take picture. We tried to mimic the user action on volume keys by using the Instrumentation API. However, to use the sendKeyDownUpSync of this API, it requires the INJECT_EVENTS permission, which a 3rd-party application is not normally supposed to have.

Do you have any experience about this topic, could you please enlighten us?

Best regards
Dat
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones