I am trying to understand the Android Lock-task mode. My requirement is to run an application in which the user does not get disrupted by messages and sounds of other apps (like incoming calls). I run my app in Lock-task mode, which looks to solve a big deal of my use case. But incoming call sounds seem not to be blocked in lock-task mode. Can this be done with lock task mode or do I need another solution for that ?
I tried AudioManager.getFocus(AUDIO_GAIN) when starting my app on top of activating lock task mode but this is not a solution. Incoming calls keep making sounds.