I am trying to start and stop PTT using media buttons from a Bluetooth headphones. It works well with the app in foreground, as I trigeer a MotionEvent in the pushToTalk button, but is possible to do with the app in background? I tried to call the onStarted method from the button listener but its not working.
Thank you