1. Are you ready for the Galaxy S20? Here is everything we know so far!

Sending button pressed action to another running applications

Discussion in 'Android Development' started by TienDat, Jan 2, 2021.

  1. TienDat

    TienDat Lurker
    Thread Starter


    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

    1. Download the Forums for Android™ app!



Share This Page