Idea to avoid hitting power button every time you put phone away - EVO 4G General

I use a one minute screen timeout, which is a bit long for the screen to stay on every time you put it back in your pocket. It also gets a little annoying hitting the power button every time after I'm done using it, for example if I'm frequently taking it out and putting it away during a text conversation. So, I used Tasker to tell it to lock the screen every time the proximity sensor fires, combined with WidgetLocker set to its own 10 sec screen timeout. I also told it to NOT do this while on a phone call so the proximity sensor would just turn the screen off but not lock it like normal in that case. So this way, you can keep a longer normal screen timeout, put the phone back in your pocket, and the proximity sensor will fire, lock the screen, and the screen will turn off in 10 seconds. The only issue here is the occasional accidental proximity sensor activation, but it's not too frequent. I'd be curious if anyone else finds this useful.
The Tasker profile:
Context: Proximity Sensor
Task:
1. If %WIN !~ Phone (if not in the phone app)
2. WidgetLocker Cmd Activate (lock screen)
Detecting if the Phone app is open does require enabling the Tasker accessibility service in Settings -> Accessibility -> Accessibility services (check Tasker).

I would shoot someone in the face every time i went to pull down the notification bar and the screen locked :/

mrono said:
I would shoot someone in the face every time i went to pull down the notification bar and the screen locked :/
Click to expand...
Click to collapse
You shouldn't have this issue really unless you frequently overshoot the top of the screen when going for the notification bar.

mrono said:
I would shoot someone in the face every time i went to pull down the notification bar and the screen locked :/
Click to expand...
Click to collapse
God i wish XDA had a "like" button

mrono said:
I would shoot someone in the face every time i went to pull down the notification bar and the screen locked :/
Click to expand...
Click to collapse
Yep, I had a profile like this set up before, but abandoned in very quickly due to this issue. Every time I went near the sensor my screen shut off, no bueno.
Hey... This thing makes phone calls too!

JTNiggle said:
Yep, I had a profile like this set up before, but abandoned in very quickly due to this issue. Every time I went near the sensor my screen shut off, no bueno.
Hey... This thing makes phone calls too!
Click to expand...
Click to collapse
Make a timeout so the proximity sensor has to be activated for at least 3 seconds

initial said:
Make a timeout so the proximity sensor has to be activated for at least 3 seconds
Click to expand...
Click to collapse
Good idea, works pretty nice, Thanks! Seems that 7 seconds is the minimum timeout allowed though, not that that's a problem, running it now. Unless there's is another way to do it that
I must recommend this setup for everyone now.
Context: Proximity Sensor
Task: Display Timeout = 7 Seconds
Handy for work/school too, I just lay my phone face down on my desk and the display takes care of itself.

JTNiggle said:
Good idea, works pretty nice, Thanks! Seems that 7 seconds is the minimum timeout allowed though, not that that's a problem, running it now. Unless there's is another way to do it that
I must recommend this setup for everyone now.
Context: Proximity Sensor
Task: Display Timeout = 7 Seconds
Handy for work/school too, I just lay my phone face down on my desk and the display takes care of itself.
Click to expand...
Click to collapse
Actually, wouldn't that profile change the display timeout to 7 seconds, effective immediately when the proximity sensor activates? So you could accidentally activate it, not be aware, and then have the display suddenly go off on you 7 seconds later. I think what initial was saying was to make it so the proximity sensor itself must be active for at least 3 seconds before anything happens, THEN do what you wish - in my case, I don't actually change the display timeout at all, I just lock the screen with WidgetLocker, at which point a 10 second timeout is in effect from that app.

xdp said:
Actually, wouldn't that profile change the display timeout to 7 seconds, effective immediately when the proximity sensor activates? So you could accidentally activate it, not be aware, and then have the display suddenly go off on you 7 seconds later. I think what initial was saying was to make it so the proximity sensor itself must be active for at least 3 seconds before anything happens, THEN do what you wish - in my case, I don't actually change the display timeout at all, I just lock the screen with WidgetLocker, at which point a 10 second timeout is in effect from that app.
Click to expand...
Click to collapse
That's true. The display timeout does change to 7 seconds. How would you set it so that the proximity sensor must be activated for a certain amount of time?

initial said:
Make a timeout so the proximity sensor has to be activated for at least 3 seconds
Click to expand...
Click to collapse
How do you do this in Tasker?

WillJitsu said:
How do you do this in Tasker?
Click to expand...
Click to collapse
I haven't been able to figure it out, anyone?

WillJitsu said:
That's true. The display timeout does change to 7 seconds. How would you set it so that the proximity sensor must be activated for a certain amount of time?
Click to expand...
Click to collapse
It does just change the display timeout, but only while the proximity sensor is covered. So if you uncover it before 7 seconds, the display stays on like normal, works well for now until I learn some more about Tasker.

Hey guys, I think I figured out how to do this. It requires using variables. Basically, you set a "proximity sensor active" variable that you create to true when it's activated (the context enter task), and set it to false when it's deactivated (the context exit task). Then in the enter task, after setting that variable, you wait 3 seconds, and then test if the variable is still true. If it is that means the exit task has not executed which means the sensor is still active and your task can proceed. If it isn't that means the exit task did execute which means you uncovered the sensor before the 3 second wait time elapsed and so you don't want to proceed. It looks like this:
Context: Proximity Sensor
Enter Task:
1. Variable Set, Name %PROXACTIVE to 1
2. Wait 3 seconds
3. If %PROXACTIVE ~ 1
4. If %WIN !~ Phone
5. If %WIN !~ Voicemail
6. WidgetLocker Cmd Activate
Exit Task:
1. Variable Set, Name %PROXACTIVE to 0
This works fine for me using WidgetLocker, since I only need the task to continue executing after the 3 second wait time, but if you are trying to actually change the display timeout, you'll still have the issue of the value reverting once you uncover the sensor. To get around this, create a separate task that changes the value (Tasks button at the bottom, then New Task), and call this task from the enter task (Tasker -> Perform Task). This puts the action behind a sort of wall that makes your main task oblivious to the fact that it's setting a revertible value, and the value will stick even after you uncover the sensor. Of course, this also means your display timeout will now remain at 7 seconds, so you'll have to create another task to restore that value on screen unlock or something like that.
Let me know if you have any questions, this seems to work okay for me!

Related

Using G-sensor to turn backlight on and Off during a Phone Call

Is there a program that will turn the screen off during a call when the phone is held vertical to your ear and then turn the screen on when the phone is lowered allowing use of the keypad similar to the Iphone?
Thanks,
Henny
You might try Mobile Magic from this forum. But I don't know for sure.
Mate there is already a thread for this, the problem is if there are loads of little threads we can't pool our resources to 'make it happen'.
Here
http://forum.xda-developers.com/showthread.php?t=451456
So far i don't think anyone has found a working solution.
check out this thread
http://forum.xda-developers.com/showthread.php?t=317070
Advanced configuration tool works perfect for me. Just set the light sensor polling to enabled, interval to 10, threshold to 5 and threshold to turn screen off to 5 also.
PatrickSmelt said:
check out this thread
http://forum.xda-developers.com/showthread.php?t=317070
Advanced configuration tool works perfect for me. Just set the light sensor polling to enabled, interval to 10, threshold to 5 and threshold to turn screen off to 5 also.
Click to expand...
Click to collapse
interval to 10? that seems very high, 100 times per second. i'd say something more like 200ms or even 500ms interval. it would use a lot less system resources.
marko
Patrick and Elmarko,
Thanks for the replay.
Tried setting the light sensor as reccomended in your post via the advanced config tool and it does not blank the screen when holding the phone against my ear.
Also, when you lower the phone does the screen come back on?
from my experience I can get rid of the black screen during phone call if i press the <home> button; it gets me back to the dialer
Hennyb said:
Patrick and Elmarko,
Thanks for the replay.
Tried setting the light sensor as reccomended in your post via the advanced config tool and it does not blank the screen when holding the phone against my ear.
Also, when you lower the phone does the screen come back on?
Click to expand...
Click to collapse
PatrickSmelt said:
check out this thread
http://forum.xda-developers.com/showthread.php?t=317070
Advanced configuration tool works perfect for me. Just set the light sensor polling to enabled, interval to 10, threshold to 5 and threshold to turn screen off to 5 also.
Click to expand...
Click to collapse
and what about when in the dark???? wanting to read or use the HD?

Proximity sensor - doesn't seem to be working

I there any settings or something to adjust proximity sensor? I was trying to turn off screen covering sensor with thumb, but.. no effect.
Does it need any setting or my phone is faulty?
I noticed the same thing on my phone today.
The proximity sensor doesn't work if you've switched off the Automatically adjust backlight option in Settings>Sound & Display>Backlight. There doesn't seem to be any way around this as the proximity sensor doesn't have its own option.
Are you in a call? You need to be calling/receiving a call for it to work.
I agree, I think you need to be in a call for the proximity sensor to work properly.
For me it works fine. And i don´t hade automatic backlight on.
aldabal said:
For me it works fine. And i don´t hade automatic backlight on.
Click to expand...
Click to collapse
That's interesting because I can toggle my proximity sensor (whilst in a call) by toggling the automatic backlight. That option must be linked to something else as well.
Screen goes black
I do have the same behavior, when I make a call the phone's screen goes black automatically so if I need to press any key have to press send to get my screen back, then use the keypad, nonsense, is anyone having the same issue ?
for me, the proximity sensor doesn't work at all. I have the automatic backlight setting and yet it still doesn't work. any idea why?
SP300
I just found the solution, I have got the screen protector on "The Original HTC SP300" and is causing the screen to go blank when you do a phone call, If a remove it a little bit from the top left corner and make a call works as spec.

Orientation sensor "fix" for 2.2 and the landscape blues!

I'm sure everyone has noticed that with 2.2, the orientation control blows. In previous versions, the orientation sensor was active anytime the display was on and it was quick. But now it is only active when an app using it is active. If you're on the home screen, the orientation sensor is not active. So, if you have the phone in landscape and back out to home, the orientation remains in landscape regardless of how you hold the phone after closing the app. If you hold the phone upright and open an app, it will open the app in landscape mode even though you're holding it vertical. It takes up to several seconds for the orientation sensor to come back on, recognize you're vertical, and rotate itself. This is annoying at best and can cause some serious lagging if the app is trying to do other things at the same time.
So what we need is a way to make the orientation sensor be active all the time again. No such option. So we'll trick it! Solution? TASKER!
Create a new profile in tasker, I called mine "Orientation Un-F&ck". Set the context for State > Orientation > Standing Up. It doesn't really matter what orientation you pick, we're just making it check the orientation. For tasks, it doesn't actually have to do anything so I made the task be Tasker > Stop. So it literally just does nothing.
So now tasker is always monitoring the display orientation. The phone doesn't give a crap why or what it does. It just knows something cares about orientation so the orientation sensor is active and doing its thing.
Result, when you back out of an app in landscape, and open an app in while vertical, it immediately switches to vertical. No delay.
I do not know what effect this will have on the battery. Probably nothing since no matter what you do, the orientation sensor is off when the display is off. Most people don't sit there staring at their home screen for hours so I anticipate no adverse effects on battery draw.
MCL1981 said:
I'm sure everyone has noticed that with 2.2, the orientation control blows. In previous versions, the orientation sensor was active anytime the display was on and it was quick. But now it is only active when an app using it is active. If you're on the home screen, the orientation sensor is not active. So, if you have the phone in landscape and back out to home, the orientation remains in landscape regardless of how you hold the phone after closing the app. If you hold the phone upright and open an app, it will open the app in landscape mode even though you're holding it vertical. It takes up to several seconds for the orientation sensor to come back on, recognize you're vertical, and rotate itself. This is annoying at best and can cause some serious lagging if the app is trying to do other things at the same time.
So what we need is a way to make the orientation sensor be active all the time again. No such option. So we'll trick it! Solution? TASKER!
Create a new profile in tasker, I called mine "Orientation Un-F&ck". Set the context for State > Orientation > Standing Up. It doesn't really matter what orientation you pick, we're just making it check the orientation. For tasks, it doesn't actually have to do anything so I made the task be Tasker > Stop. So it literally just does nothing.
So now tasker is always monitoring the display orientation. The phone doesn't give a crap why or what it does. It just knows something cares about orientation so the orientation sensor is active and doing its thing.
Result, when you back out of an app in landscape, and open an app in while vertical, it immediately switches to vertical. No delay.
I do not know what effect this will have on the battery. Probably nothing since no matter what you do, the orientation sensor is off when the display is off. Most people don't sit there staring at their home screen for hours so I anticipate no adverse effects on battery draw.
Click to expand...
Click to collapse
I look at the home screen for about 10 hours a day everyday.
thanks
00_MACKIE_00 said:
I look at the home screen for about 10 hours a day everyday.
thanks
Click to expand...
Click to collapse
Well there is nothing Tasker can do for you other than generate a timed pop-up that says "Get a life"

[Q] Auto-dimming bug

Great phone but, it appears to be a bug with the screen dimming.
Regarding settings, I have everything turned off. Adapt display is off. Auto-brightness is off. Auto-adjust screen tone is off also.
I know Samsung displays dim if the phone overheats but my phone will auto-dim even if the phone is cool.
What I've found out is that the phone will only dim "permanently" when the screen is about to shut off.
For example: Set the screen shut off to 30 seconds and around the 28 second mark, the screen will dim for a couple of seconds before it shuts off. This is where the auto-dimming will "permanently" kick in. When the screen dims at the 28 second mark for a second, i'll touch the screen so it doesn't shut off. But by this time, the screen has dimmed already and won't go back to the regular brightness. I have to lock and unlock the phone for the dimmed screen to go away.
This scenario has happened every single time. Extremely annoying.
Anyone else experience this?
swy05 said:
Great phone but, it appears to be a bug with the screen dimming.
Regarding settings, I have everything turned off. Adapt display is off. Auto-brightness is off. Auto-adjust screen tone is off also.
I know Samsung displays dim if the phone overheats but my phone will auto-dim even if the phone is cool.
What I've found out is that the phone will only dim "permanently" when the screen is about to shut off.
For example: Set the screen shut off to 30 seconds and around the 28 second mark, the screen will dim for a couple of seconds before it shuts off. This is where the auto-dimming will "permanently" kick in. When the screen dims at the 28 second mark for a second, i'll touch the screen so it doesn't shut off. But by this time, the screen has dimmed already and won't go back to the regular brightness. I have to lock and unlock the phone for the dimmed screen to go away.
This scenario has happened every single time. Extremely annoying.
Anyone else experience this?
Click to expand...
Click to collapse
Seems like software problem, do you use custom roms? kernels? maybe any app that could control ur screen? try to do hard reset.
GodXen said:
Seems like software problem, do you use custom roms? kernels? maybe any app that could control ur screen? try to do hard reset.
Click to expand...
Click to collapse
Using stock Kit-Kat 4.4.2
No other strange apps. Ughh hate to have to do a hard reset. Just set this thing up yesterday brand new. :crying:
Have the exact same issue but it only happens some times very strange.
acerdroid said:
Have the exact same issue but it only happens some times very strange.
Click to expand...
Click to collapse
Yes, same here. It happens alot. Not every single time, but alot of the times.
Try this...
Hi
As the other user said it might be the software bug.
Please try this app. Disable your auto brightness and install this software https://play.google.com/store/apps/details?id=com.vitocassisi.luxlite
This lite version is free. Try this. If everything works, you may consider the paid version to support the dev guy...

TWEAK/TIP - Prevent accidental unlocks

One of the big issues I have found, mainly with CM based ROMS, is that the option to prevent accidental unlocking seems to be missing/unavailable.
I've been testing various apps and utilities that monitor the proximity sensor, but there is one big issue - they monitor for screen on, but it seems in CM12.1 that the monitoring app doesn't work or get a screen on signal when you're using a lockscreen.
So the solution is not to check for screen on, but check for screen unlock.
I have a TASKER profile set up as follows:
If screen unlocked and proximity sensor on, then turn the screen off.
Works really simply. cover the proximity sensor with a bit of cloth or something and test it - if you double-tap the screen on, or it wakes due to a notification, the screen still goes on. But any subsequent action, eg slide to unlock or click on a notification, triggers the screen unlock flag, and this then checks to see if the proximity sensor is covered, and if it does, it turns the screen off again.
I CAN POST SCREENSHOTS IF ANYONE WANTS FURTHER INFO - BUT I'D SUGGEST GIVING TASKER A GO AND A PLAY ANYWAY, IT'S A BRILLIANT APP.

Categories

Resources