Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

New answers tagged

1 vote

How can I prevent an app from interrupting audio playback of some other app?

If you have a Samsung phone then Sound Assistant has a Multi Sound option that can allow specific applications to be able to play audio at the same time as other applications. Once you toggle it on ...
user avatar
  • 412
15 votes
Accepted

How can I prevent an app from interrupting audio playback of some other app?

You can set TAKE_AUDIO_FOCUS permission of that app to ignore: appops set <PKG_NAME> TAKE_AUDIO_FOCUS ignore Using Permission Manager X (PMX) this can be done conveniently for any app: ...
user avatar
  • 17.5k
0 votes

Control playback using headset media buttons when using Android Select to Speak functionality

You may be able to set up a custom accessibility service (https://developer.android.com/guide/topics/ui/accessibility/service) and listen for KEYCODE_MEDIA_PLAY_PAUSE using a background service (https:...
user avatar
  • 143

Top 50 recent answers are included