Battery question with Proximity sensor

Laurence

New member
Hello all,

As the pocket mode doesn't work for this phone out of the box I have used Macrodroid to fix it. It checks the proximity sensor when the screen turns on, and if covered it will turn the screen back off. It works perfectly, but I have a high background battery drain - 10%+ overnight. I will test without Macrodroid running.

There was one setting I had to turn on in Macrodroid "Proximity sensor trigger, work with screen off". It says it may cause significant battery drain if this option is enabled.

I don't actually need it to run with the screen off, but it won't work without this enabled. I only want it to check when the screen is turned on but I cannot get this to work.

Thanks
 

Endercraft

Moderator (& bug finder :D)
You should only check proximity sensor with it's constraint and not trigger. Use screen on trigger, screen off action and proximity sensor (near) constraint.
 

Laurence

New member
You should only check proximity sensor with it's constraint and not trigger. Use screen on trigger, screen off action and proximity sensor (near) constraint.
Yeah that's exactly what I tried at first and tried again now. Sadly that doesn't work at all and it requires the Proximity sensor trigger to work with screen off, to work.

It doesn't make any sense.

I wonder if tasker would have the same problem or not.

My only guess is it needs a few ms of delay for the sensor to return a value but you are not able to do this in the correct way to work.
 

sampleuserhere

Active member
Yeah that's exactly what I tried at first and tried again now. Sadly that doesn't work at all and it requires the Proximity sensor trigger to work with screen off, to work.

It doesn't make any sense.

I wonder if tasker would have the same problem or not.

My only guess is it needs a few ms of delay for the sensor to return a value but you are not able to do this in the correct way to work.

Tasker has Test Sensor action, you may have a shot with it.

Anyway, does the battery still drain about the same if you attach screen on constraint to the proximity trigger?
 

Dm114

Well-known member
Yeah that's exactly what I tried at first and tried again now. Sadly that doesn't work at all and it requires the Proximity sensor trigger to work with screen off, to work.

It doesn't make any sense.

I wonder if tasker would have the same problem or not.

My only guess is it needs a few ms of delay for the sensor to return a value but you are not able to do this in the correct way to work.
Instead of using the Proximity sensor as a constraint with Screen on trigger, use this trigger without any constraint and test the Proximity sensor inside the macro.

I guess Proximity sensor doesn't work on Screen on trigger because when testing the constraint, the screen is not On yet. And if it is still Off, proximity sensor doesn't work yet...

Let have it a try!
 
Top