Proximity sensor condition bug?

Post your questions and help other users.

Moderator: Martin

Post Reply
colabi
Posts: 134
Joined: 06 Jan 2013 22:33

Proximity sensor condition bug?

Post by colabi » 07 May 2013 11:14

trigger: Proximity Sensor: Distance < 2.5cm
>
condition: Proximity Sensor: Distance < 2.5cm
>
true
>
action: vibrate

condition always return false

this is log
log.txt
(21.58 KiB) Downloaded 934 times

Rm.
Posts: 6
Joined: 02 May 2013 09:15

Re: Proximity sensor condition bug?

Post by Rm. » 07 May 2013 11:26

Up vote. The same happens to me - when I use proximity sensor in condition, it always returns false (even on screen on), but in the designer of the condition, I can see the proximity value changing.

syndromtr
Posts: 31
Joined: 01 Feb 2013 13:28

Re: Proximity sensor condition bug?

Post by syndromtr » 07 May 2013 12:15

also i have problems with proximity sensor trigger values in my smartphone,
(razr xt910 rooted - android 4.0.4)

when i create a new flow and insert proximity trigger, it gives "current value" in cm's.
by default it's 100 cm. when i move my hand over sensor, it becomes 3 cm. (no other values)
even i touch my finger on the sensor it's still 3 cm.

however, i have created a flow with that trigger, <5 cm and it's triggered. i use it to turn screen on by waving hand over sensor.. so i can use it with only two values.. 100 cm and 3 cm..

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Proximity sensor condition bug?

Post by Martin » 08 May 2013 09:39

Proximity sensor on many models only returns two values (near and far). The exact values measured depend on model and can be checked using a trigger or condition Proximity Sensor.

It is a known limitation that the condition Proximity Sensor can not access the current value on some devices. The sensor only provides a new measurement to apps, when the value changes between the near and far value. The condition will not work on such a device (see help). Only possibility is to use a trigger on such a phone and to continuously read the sensor value, but this will consume a lot of battery.

Regards,
Martin

colabi
Posts: 134
Joined: 06 Jan 2013 22:33

Re: Proximity sensor condition bug?

Post by colabi » 08 May 2013 10:48

OK Martin, thanks
but I noticed that this is working an return true:

trigger: Proximity Sensor: Distance < 2.5cm
>
sleep 500ms
>
condition: Proximity Sensor: Distance < 2.5cm
>
true
>
action: vibrate

maybe you coud delay a little condition checking

Post Reply