• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Problem in making Proximity App in Tasker

thahim

Android Enthusiast
I just installed and i saw there is no option to track proximity sensor in tasks.
I want to build an app to lock screen when sensor is covered, but i think its impossible with tasker? or is there any way?

Can i make an app through its profile?
 
Yeah i get that man :) good luck :thumbup: maybe try some coding instead of being tied to Tasker's limitations
 
The status of the Proximity Sensor is available as a context via: state / sensor / proximity sensor.

If you need to access state of proximity sensor within a task (rather than as profile context), here's how. Two steps:
Step 1 - create a profile... let's call it proxprofile...with the single context of proximity sensor (*) and the action "stop". The profile itself does nothing, but will be useful in combination with step 2.

Step 2 - In your task, simply check if the profile is active (i.e. check if %PACTIVE ~ *proxprofile*) ... that is equivalent to testing the status of the proximity sensor.

* I say this for simplicity. It would be more energy efficient to combine the context proximity sensor with other lower-power contexts if it is possible and fits with your logic.

By the way, there is a forum here on AndroidForums for Tasker... you'll probably do better posting this type of question over there than in the general Applications forum
 
The status of the Proximity Sensor is available as a context via: state / sensor / proximity sensor.

If you need to access state of proximity sensor within a task (rather than as profile context), here's how. Two steps:
Step 1 - create a profile... let's call it proxprofile...with the single context of proximity sensor (*) and the action "stop". The profile itself does nothing, but will be useful in combination with step 2.

Step 2 - In your task, simply check if the profile is active (i.e. check if %PACTIVE ~ *proxprofile*) ... that is equivalent to testing the status of the proximity sensor.

* I say this for simplicity. It would be more energy efficient to combine the context proximity sensor with other lower-power contexts if it is possible and fits with your logic.

By the way, there is a forum here on AndroidForums for Tasker... you'll probably do better posting this type of question over there than in the general Applications forum

Thanks I will try. Yeah I saw that forum :)
 
Back
Top Bottom