[TASKER] Help with proximity sensor conditionals and wifi profiles - Android Q&A, Help & Troubleshooting

Hi
Tasker begginer here.
I'm having some minor issues with Tasker that I was hoping you could help me sort out:
I use Greenify and I was having a little problem with autohibernation feature in my unrooted Nexus 5: The screen has to turn on in order to automatically greenify something. This is a problem when the phone is in my pocket or facing down on the table because it conflicts with Gravity Screen (this app turns the screen off -and keeps it off- when the proximity sensor is active and the device is in a particular orientation), so when the phone is in my pocket or laying face down on a surface, Greenify can't finish its job because Gravity Screen will quickly turn the screen off.
In light of this, I disabled the autohibernation feature in Greenify and made a rather simple group of profiles to control it from Tasker. The main profile, the one that calls the "Hibernate now" shortcut from Greenify, is triggered when the screen turns off and has and If condition. This is the logic of that if:
- If
Proximity sensor: Not active
AND
Screen off
- Then
Run task
I do this to make sure that the hibernate action is not triggered while the screen is on or while the proximity sensor is active. Since Tasker doesn't have a variable for monitoring the proximity sensor, I made a profile that sets a variable (%PROX) to 1 when it's covered and 0 when its uncovered. So the if conditional uses the value of %PROX.
The problem is that if I turn the screen on WHILE the proximity sensor is active, Tasker skips the if statement (as it should), but if I turn the screen off with the proximity sensor uncovered and then cover it, it'll run the task. It's as if the profile that sets the variable %PROX to 1 does not work while the screen is off. Is this normal behaviour? How can I make this work better?
I managed to sort this out by deactivating Gravity Screen at the beggining of the task and reactivating it at the end (with a little waiting to give Greeenify time to finish), but I still want to keep my screen off while the phone is in my pocket.
My other doubt is regarding a group of profiles (that I got from here) that turn Wi-Fi on whenever I'm near two locations using the cell tower and Wifi near state in Tasker. I made some minor adjustments to these profiles, but they're still basically the same. The problem I'm having is that, most of the times, these profiles won't do anything if the screen is off. For example, I have it set to recognize cell towers near my house (and of course my Wifi connects automatically). Let's say I get home and I haven't used my phone in a while (screen off), I'd expect to see my Wi-Fi on and connected some time after I arrived, but this is not the case. It is not until I turn the screen on AND unlock the phone that I see the profiles doing their thing. I see wifi connecting, flash alerts and so on. This probably have something to do with the fact that, for some reason, my phone will not connect to a network while the screen is off. Same example, I get home with wifi on and the screen off, and I'll only see the wifi connecting after I turn the screen on (this happens with or without Tasker and with any wifi) regardless of how long I've been home.
Could it be that the near wifi profile cannot toggle wifi or can't recognize any network while the screen is off due to this bug I have with Wifi connections in my phone (Which I haven't been able to sort out)?
Thanks in advance and sorry for the long post!

Help with wifi profile
Hi, i saw your post in here and i think i can help, do you still have that problem or you managed to fix it? I think I might be able to help you

Related

[Q] Keep app running with screen off

Ok, I have a voice changer app that I want to use with the screen off. Ideally I'd start the app, turn on real-time processing, then turn the screen off. Currently, it only runs when the screen is on, as soon as I turn the screen off the app stops all voice processing. Screen needs to be off so the battery will last longer, and so the settings can't be changed accidentally (so touch has to be disabled as well).
I either need the app to keep running in the background, or have the screen turn off but not actually locked (I dunno the right term, but if the screen was off and didn't accept touch input, but the phone thought the screen was on...that'd be fine).
Closest I've found is to edit the AndroidManifest.xml file to set it persistent, then make it a system app. This will take me a while to figure out, and not even sure it'll work.
Is there some simple solution I'm overlooking? I've seen an app that turns off the screen with help from the proximity sensor...but I want the screen off whether it's in my pocket or lying on top of a table.
Edit: I tried some apps that use the proximity sensor to turn off the screen; as soon as the screen goes off, the voice changer app just stops. I have no idea what's triggering it (if the phone is actually entering a sleep state, or if the app is specifically watching for the screen to go off and suspends itself). Thought that might be a workaround, but nope.

[Q] Very odd behavior: Bluetooth, Tasker, CarHome Ultra

UPDATE: CapnPez's suggestions seems to have worked. Screen on/off needs to be set as an event, not a state!
Thanks for the help!
My setup:
Rooted
Running SnowJB 1.1
Tasker Installed...no profiles or task setup to toggle the Bluetooth radio. Do use a Screen On/Off state profile to turn on Wifi/Data/Gps/NFC when screen is on. When screen is off, they are all off. Also have Secure Settings plugin installed to toggle NFC and GPS.
NFC Task Launcher installed...Only one tag exists for my "car mode". When I place the phone in the car dock it launches CarHome Ultra
CarHome Ultra installed....turns on BT when it launches.
So with all of this setup, let me explain the issue. When I place the phone in my car dock and turn the screen on, NFC radio should turn on, NFC task launcher should then read the tag in the car dock which launches CarHome Ultra. CarHome Ultra turns on BT when it launches.
What has been happening lately is when CHU launches, the bluetooth starts toggling on and off VERY rapidly. I can see the BT toggle icon in the notification power bar flashing or blinking. Pressing the BT icon does nothing. Closing CHU does nothing. I have to restart the phone to get out of this strange blinking loop. I have frozen/uninstalled Tasker and everything seems to behave as designed. However, I reinstall tasker, DO NOT CREATE ANY BT TOGGLE ACTIONS, and the blinking BT returns.
Has anyone experienced similar behavior?
I'm not sure if this is the problem, but my first thought is that you mentioned that you are using the screen on STATE. Perhaps you should use the screen on EVENT. What it might be doing with the state is that it checks that the screen is on and toggles your wifi/data/gps/nfc and the turned on nfc now detects the tag again and then tries to re-turn on your bluetooth. It might be doing this each time it detects that you are still in that state (as quick as the interval it takes to recheck that state). With an event, it should just trigger once.
This is my first guess, but it might be worth a shot to change it to the event. I may be mistaken with what Tasker is doing when it is in the state. Good luck and I'll keep thinking what else it might be (there are others out there who are better Tasker Gurus than I).
Thanks, I have made this change and will give this a try. It's strange that the thing most affected is the Bluetooth and I have no Tasker profiles set up to toggle the BT radio.
CapnPez said:
I'm not sure if this is the problem, but my first thought is that you mentioned that you are using the screen on STATE. Perhaps you should use the screen on EVENT. What it might be doing with the state is that it checks that the screen is on and toggles your wifi/data/gps/nfc and the turned on nfc now detects the tag again and then tries to re-turn on your bluetooth. It might be doing this each time it detects that you are still in that state (as quick as the interval it takes to recheck that state). With an event, it should just trigger once.
This is my first guess, but it might be worth a shot to change it to the event. I may be mistaken with what Tasker is doing when it is in the state. Good luck and I'll keep thinking what else it might be (there are others out there who are better Tasker Gurus than I).
Click to expand...
Click to collapse

Disable fingerprint sensor via proximity?

I have a Mi A3 and think it's great, but there is one issue I'm facing.. the fingerprint sensor is always active and when the phone is in my pocket and touches my leg, it wakes the screen after X failed attempts.
Multiple times I've pulled out my phone to find my leg has been typing numbers into the emergency dialler..
Is there any way (prefer no root - but so be it if needed..) to use the proximity sensor to kill the FP sensor? That way when it's covered in my pocket the FP sensor would be disabled and stop waking the phone all the time.
And before anyone says just put in your pocket with the screen out.. well that's just asking to get it smashed ?
Try disabling "show fingeprint icon when screen is off" feature.
Tried that one already. Unfortunately the sensor is still alive so if something touches it the phone attempts to unlock.
After a couple of attempts it seems to turn on and show buttons for emergency dialler / pin unlock.
Not sure if this would be usable on A3, but you could try this approach:
https://android.stackexchange.com/questions/153948/completely-disable-the-fingerprint-sensor
Edit: just tried it on my A1. I can disable the FP sensor with:
Code:
echo soc:fpc1020 > /sys/bus/platform/drivers/fpc1020/unbind
BUT, can't get it back yet (only with reboot): this should be the correct command, but it doesn't do anything
Code:
echo soc:fpc1020 > /sys/bus/platform/drivers/fpc1020/bind
Custom ROMs have something like pocket mode that detects and prevents it don't they? I wish something like that would be available for stock as well. Wouldn't mind root.
I have the same problems with scanner acting in a pocket. Looks like I have to disable scanner for now. This can be done by removing recorded fingerprints from settings.
As a workaround for emergency dialing, you can use WaveUp app and set it to lock with proximity sensor. It probably won't prevent fingerprint readings, but at least the display will turn off in your pocket. Works best with root, I'm using it on Mi A1. "Turn display on when removing from pocket" feature is highly addictive. I use HW power button mainly for taking screenshots now..
Edit: Tasker with states "proximity sensor and orientation - phone upside down" and task "display - turn off" can do the same if you want to keep it simple.
Edit 2: Nicer Tasker profile, turns screen off only when the screen is locked (prevents accidental locks while using the phone):
Profile 1 - state "proximity sensor" + state variable value "%SCREEN_LOCKED ~ true", task "display - turn off"
Profile 2 - event "display unlocked", task "variable set, %SCREEN_LOCKED to false"
Profile 3 - event "display off", task "variable set, %SCREEN_LOCKED to true"
Turn display on&off with power button and you are good to go.
Thanks will give the commands a go when I get chance and see if it works on the A3.
put you phone opposite side .... screen upwards in pocket.
hi this feature works on my device when i turn off the proximity sensor the fingerprint icon does not show up on the screen
I have this problem too with Android 11.
I wanted to try the method with fpc1020 driver. The driver is here, but what is weird, that in /sys/bus/platform/devices is not such device attached :/
The easily way to do this is root the phone. After this you can disable all useless features
wetito said:
The easily way to do this is root the phone. After this you can disable all useless features
Click to expand...
Click to collapse
I have rooted phone but you probably doesn't understand the problem.
I don't want to completely disable fingerprint, I just want the FP to be disabled by proximity sensor, because it's bul*** to have enabled FP in pocket...
Benik3 said:
I have rooted phone but you probably doesn't understand the problem.
I don't want to completely disable fingerprint, I just want the FP to be disabled by proximity sensor, because it's bul*** to have enabled FP in pocket...
Click to expand...
Click to collapse
There"s a quick setting to add by developer settings that disable all sensors. Have you tryed? Maybe it work

Amazfit T-Rex -- Is the screen suppose to light-up on touch?

Hi,
I have this issue with my watch: sometimes I can light-up the watch by touching the display and most of the times this doesn't work. Is this a feature (when it works) or a bug (when doesn't work)?
Thank you!
Just few seconds after your screen goes off, it would get back on by tapping on screen. In other cases you couldn’t make it on by tapping.
I just hop on this thread about screen light.
I trying to find the setting to turn off the screen while on running activity. I notice the screen is light on entire running activity until complete. I had already enable wrist lift option to turn on the screen when i need checking the running stats.
Anyway find the setting to turn it off or perhaps sleep mode. Thank you in advance.
There is no such option in Zepp yet. Hopefully they will add it, since screen-on is very battery-consuming.
casper709394 said:
I just hop on this thread about screen light.
I trying to find the setting to turn off the screen while on running activity. I notice the screen is light on entire running activity until complete. I had already enable wrist lift option to turn on the screen when i need checking the running stats.
Anyway find the setting to turn it off or perhaps sleep mode. Thank you in advance.
Click to expand...
Click to collapse
You can turn it off by going into workout settings.
If you disable light on lift, touch to light up display will be also disabled. At least it happens on mine.

Question Lockscreen is broken on my main profile

I've been documenting my struggles with my lock screen in another thread. But I just had a major breakthrough and didn't want this to get buried.
To recap, my lockscreen has been a buggy mess from day one. The fingerprint sensor barely works, the fingerprint icon randomly disappears, and the gray border that's supposed to appear around the fingerprint icon simply doesn't show up. The lockscreen doesn't light up when I pick up the phone either (it stays dimmed). Also, wallpapers don't show up on the lock screen, and the big ugly clock sometimes disappears or moves itself to the top-left.
I've tried just about everything to fix this. As a last-ditch effort, I added a new user profile only to find that the lockscreen works perfectly well for this new profile (but still not for my main one).
Here's my main profile with the unusable lockscreen:
broken lockscreen of main profile
Watch "broken lockscreen of main profile" on Streamable.
streamable.com
And here's what it looks like when using the other profile:
working lockscreen on new profile
Watch "working lockscreen on new profile" on Streamable.
streamable.com
So there's clearly some obscure bug that most people aren't experiencing here. I'd love to just figure it out so I can move on.
When I didn't have the "always on display" turned on, the phone was very consistant about turning on properly when I picked it up. I ran it this way for 3-4 days without any issues.
After reading some articles on the P6, I realized that it has an AOD and that it was turned off. So I turned the AOD on while leaving all the other settings set the same. At first, the finger print icon wouldn't appear consistantly, but that is because I had adjusted the animation scale settings in the Developer settings. Changing that back to stock fixed the issue with the finger print icon not showing up.
That beings said, I have experienced the same "unresponsive" screen many times over the last couple of days that I have had the AOD turned on. The screen stays dimmed (or even turned off if I pull the phone out of my pocket) and the finger print reader is inactive (even though the icon is displayed). The screen is suppose to turn on when I lift the phone up, but it doesn't always do it. When this happens, I have to either manually turn the screen on using the power button, or double tap the screen to wake it. This is clearly a bug in the system somewhere. I probably need to report it to Google, but hopefully it is fixed soon.
After spending way too long on this, I've determined that the bug occurs consistently with these specific settings (although it may also occur for similar ones):
Lock after screen timeout: 30 minutes (or anything high enough to prevent it from locking between tests)
Power button instantly locks: disabled
Lift to check phone: disabled
Tap to check phone: disabled
Always show time and info: enabled
Replication steps:
1) Enter the above settings
2) Press the Power button to go to the lockscreen
3) Set your phone down for a couple seconds
4) Pick your phone back up and try to use the fingerprint sensor
Result: The fingerprint sensor won't work the first time.
I think all the other issues I had were actually stemming from this one issue.

Categories

Resources