System control take over by whatsapp media playback or a call For some reason, as I activate media playback in WhatsApp or hold a call there, mobile phone controls are deactivated and the screen is blacked out until the playback, or the call ends.

This is a very unpleasant behaviour, how to deal with it? This happens also with a full charge; first I thought this would be some energy saving trick but it seems not.

It is not even possible to regulate the audio volume during that.


On video playback this does not happen.
I do not touch the proximity sensor on audio playback.


Device: Sony E6653. Androis OS 7.1.1, Kernel 3.10.84, build number 32.3.A.1.54
The problem you are describing, is a result of a faulty proximity sensor. 

What's supposed to happen is, when you listen to voice note or make a call, the screen will stay on, but as soon as you put the phone to your ear, the screen turns off. When the sensor is broken, it thinks that the phone is always by your ear.

One way to get around this, is by using an app called macrodroid.

You can set it in a way, that when the proximity sensor is activated while in WhatsApp, the screen will stay on.

Here are the few simple steps to set this up:


Open macrodroid  &rarr; add makro  &rarr; sensors  &rarr; proximity sensor  &rarr; near  &rarr; ok. Now press on proximity sensor and add each of the options separately.
Press on actions on the top of the screen  &rarr; screen  &rarr; screen on/off  &rarr; screen on (alternative)  &rarr; ok
Constraints  &rarr; device state  &rarr; application running  &rarr; running in foreground  &rarr; ok  &rarr; WhatsApp  &rarr; ok.  &Rarr; application running  &rarr; alive in background  &rarr; WhatsApp  &rarr; ok.
Now press on the check mark on the bottom, and give a name to this action.
From the main page of the app, press in macros, and after pressing on the one you just made, near constraints, press on and and change it to or. You should see the exact settings as I have below:




Now test this out. Go into WhatsApp and make a call. The screen will stay in during the call.

Note:


The screen will stay an as long as WhatsApp is running, and it will disregard the set sleep time. It will also stay on while not in WhatsApp, as long as WhatsApp is running in the background. If that happens, you can go into your recent apps, and swipe WhatsApp away.
I tested this in s galaxy s5. No guarantee that it works across all phones.