0

Is it possible to mute the phone while my app is active? Or to even disable the phone call screen?

My use case is following:

I have a music player in my app and it's a fitness app, so the user does eventually not want to be disturbed. So I want to allow him to activate a "do not disturb" mode, which disables incoming call notifications, at least the sound.

What I need is following:

Bluetooth must work, because of the headphones, so plane mode would not even be a manual workaround

Can this somehow be achieved?

prom85
  • 16,896
  • 17
  • 122
  • 242
  • possible duplicate of [What permissions are needed to programmatically mute a phone call, from a background app?](http://stackoverflow.com/questions/21468064/what-permissions-are-needed-to-programmatically-mute-a-phone-call-from-a-backgr) `Note that this isn't the only duplicate, there are a number of suggestions on the sidebar of the post.` – KevinDTimm Mar 14 '14 at 17:15
  • It is not a duplicate of that question, but that question will certainly point you in the right direction. You need to look at AudioManager and look at the methods available from that class (including setStreamVolume or setStreamMute specifically) – zgc7009 Mar 14 '14 at 17:21

0 Answers0