lundi 2 février 2015

[TASKER] Help with proximity sensor conditionals and wifi profiles topic






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!






Aucun commentaire:

Enregistrer un commentaire