Reliable way to toggle location settings without root? - Tasker Tips & Tricks

I've made some tasks to let me switch location settings between off, battery saving and high accuracy, when I'm home, go to bed or leave for work. I'm on an unrooted OnePlus 5 running OxygenOS (Android 7.1.1), and am currently using AutoTools by joaomgcd to accomplish this, through its Secure Settings module after granting it permissions via ADB.
I've noticed it being unreliable though, several times when running my 'sleep mode' task, it won't successfully toggle my location settings as setup, leaving them unchanged. If I re-add that Action in the task and run it again, it seems to work, but fails again arbitrarily at some point in the future.
Is there a more reliable way to toggle location settings without root? Or alternatively, a way to make this current method work reliably?

Anyone?

Phosphenetre said:
I've noticed it being unreliable though, several times when running my 'sleep mode' task, it won't successfully toggle my location settings as setup, leaving them unchanged.
Click to expand...
Click to collapse
I regularly switch settings using root and shell commands, so my initial suspicion is to figure it may be something other than the AutoTools Secure Settings changes. For example I changed all my long waits to global variable timers, which ended up having an issue that occasionally timer tasks weren't triggering with the screen off. It turned out my issue was that the instantaneous times worked with the screen on, but they were sometimes being missed with the screen off. Things started working correctly after I got rid of the "To" times and just used "From" for the profile times. Basically I figure you might be getting into some sort of similar issue, where power saving features could interfere with expectations in the routines. Without knowing more about the sleep mode task, it's difficult to really give much useful information, but I'd suspect it could be something like Doze interfering. Whitelisting Tasker and Secure Settings might fix that sort of thing, but it probably wouldn't be my approach.
The only other item that comes to mind is if the phone has the popup when switching modes. I think the screen has to be on for AutoInput to work. That repeated popup finally went away on my phone, so I might add high accuracy when plugged in.

Related

Tasker profile to turn Airplane Mode Off when performing Touchless Controls Voice Sea

I've been playing around with Tasker trying to detect when Touchless Controls are summoned to disable Airplane mode(Secure Settings).
Does anyone have a profile for this because I was pretty close to getting it to work but I had a couple of issues. I was able to get it to perform the task when Touchless Controls were active. I would have it disable Airplane Mode, close Touchless Controls and launch Voice Controls but even using the Wait command I wasn't able to get it to launch Voice Controls once the internet connection was established.
I must have been setting the task wrong, I also noticed even though I used the If parameter for Airplane Mode Set, it would close the Touchless controls if Airplane Mode wasn't enabled.
ohmimpotence said:
I've been playing around with Tasker trying to detect when Touchless Controls are summoned to disable Airplane mode(Secure Settings).
Does anyone have a profile for this because I was pretty close to getting it to work but I had a couple of issues. I was able to get it to perform the task when Touchless Controls were active. I would have it disable Airplane Mode, close Touchless Controls and launch Voice Controls but even using the Wait command I wasn't able to get it to launch Voice Controls once the internet connection was established.
I must have been setting the task wrong, I also noticed even though I used the If parameter for Airplane Mode Set, it would close the Touchless controls if Airplane Mode wasn't enabled.
Click to expand...
Click to collapse
I'm still a tasker noob but I'm wondering, how is it knowing that touchless controls are active?
I would think the easiest way, and I'm throwing this out there , is to enable airplane mode when the screen is off and disable it when the screen is on. quick and simple.
ForSquirel said:
I'm still a tasker noob but I'm wondering, how is it knowing that touchless controls are active?
I would think the easiest way, and I'm throwing this out there , is to enable airplane mode when the screen is off and disable it when the screen is on. quick and simple.
Click to expand...
Click to collapse
UPDATE: Ok i figured out what was wrong. Instead of checking AIR is Set, I needed to specify *on* and *off* so
Currently the task is
1 If %AIR Is *on*
2 Secure Settings, Airplane Mode Disabled (There may be a 3 second delay here or on the next step)
3 Kill App Touchless Control
4 Wait X seconds (3-4 seconds seems to be optimal)
5 Load App Voice Search (Can set If %AIR Is *off* may help)
ohmimpotence said:
It was tricky finding it, using the Application Context even when I selected all I wasn't able to initially find Touchless Controls. I searched for it in ES File Explorer and made a copy of it to another folder and launched the properties and suddenly I was able to locate it in Tasker, not sure what actually made it show though.
Your suggestion sounds like a pretty considerable method, I'll give it a shot. I think the main issue is that I'm not able to get enough of a delay between turning Airplane mode off and launching Voice Search because the connection doesn't fully establish yet.
Currently the task is
1 If %AIR Is Set
2 Secure Settings, Airplane Mode Disabled
3 Kill App Touchless Control
4 Wait (tried variable times, it didn't seem to make a diff. I also tried Wait Until %Air ! Set)
5 Load App Voice Search (Tried If %Air ! Set, didn't seem to help)
Click to expand...
Click to collapse
oddly enough I don't even get the option to set airplane mode in secure settings but I see the dilemma you're running into .. in my 'scientific test' I would disable all radios minus the actual cellular. Then from there let the screen sleep. Speak a command and it would light up, kicking on the Bluetooth and Data radios in a instant, then jump straight to the google voice prompt long before wireless was connected, buuuuuut, I had bluetooth, and Mobile data load almost immediately upon the screen lighting up. Do you specifically need wifi or can you use mobile data until wifi is up?
ForSquirel said:
oddly enough I don't even get the option to set airplane mode in secure settings but I see the dilemma you're running into .. in my 'scientific test' I would disable all radios minus the actual cellular. Then from there let the screen sleep. Speak a command and it would light up, kicking on the Bluetooth and Data radios in a instant, then jump straight to the google voice prompt long before wireless was connected, buuuuuut, I had bluetooth, and Mobile data load almost immediately upon the screen lighting up. Do you specifically need wifi or can you use mobile data until wifi is up?
Click to expand...
Click to collapse
You'll need to load Secure Settings App and download Helper under one of the tabs on the top (There is a 4.1+ alternative)
Also to mess with Airplane on 4.2+ firmware you need an Xposed module, just search Airplane.. it says Jellybean but it works fine with KitKat.
I added another tidbit to the task so it will vibrate if I launch Touchless Controls with Airplane enabled, that way I realize not to speak until the second beep. Not sure why but it didn't function well when I added it to the same task so I created another Touchless App context profile and a task that just vibrates but it could just be me.
The only other issue is making sure Super SU settings remembers Secure Settings is permitted, that was an issue when it was slow to recognizing permissions.
I also created an App (using Tasker Factory) out of Airplane Mode enabled task so I can just say Ok Google Now, Launch Airplane (I also have a Screen Off app)
Everything is working good now
How did you end up getting Tasker to recognize whether or not Touchless Controls was active? I'm trying to get Tasker to turn on the wifi, (sometimes I turn it off, then use TC--but it doesn't have data, so it's useless), when TC is called.
natezire71 said:
How did you end up getting Tasker to recognize whether or not Touchless Controls was active? I'm trying to get Tasker to turn on the wifi, (sometimes I turn it off, then use TC--but it doesn't have data, so it's useless), when TC is called.
Click to expand...
Click to collapse
You should just be able to set the profile to run on the TC app (I forget all the specific names, but one of the profile trigger actions is 'apps')
piccit said:
You should just be able to set the profile to run on the TC app (I forget all the specific names, but one of the profile trigger actions is 'apps')
Click to expand...
Click to collapse
I don't have Touchless Controls as an app--just Touchless Controls Settings.
natezire71 said:
I don't have Touchless Controls as an app--just Touchless Controls Settings.
Click to expand...
Click to collapse
I believe that works
piccit said:
I believe that works
Click to expand...
Click to collapse
Not for me
any idea how to set up Tasker to turn on airplane mode at a specific time and turn it off at a specific time? The idea is to have airplane mode turned on at say 1am and turned off at 7am. Anyone?

Screen dimming - requires single tap to "wake" - looking for a way to disable

Screen dimming - requires single tap to "wake" - looking for a way to disable
So I am running a stock Sprint HTC One (Android 4.4.2, software version 5.03.651.3) and for months now (for some reason, I thought I first noticed this behavior right after 4.3 got pushed out), there is a single behavior that has perplexed me, and despite trying various configuration changes, I cannot seem to get it to resolve.
I currently have all power-saving features disabled, screen timeout set to 1 minute, automatic brightness enabled (slider, which shouldn't make any difference, is set to the middle), daydream is disabled, and developer options are on with no screen timeout while charging enabled.
What seems to happen is that after about 1 minute (also the duration set for screen timeout, which initially made me wonder), the screen (while plugged in and charging) will dim slightly, maybe about 50% of the standard brightness when the phone is actively being used, and I have to tap the screen (not the double-tap I have been reading about, which supposedly isn't even implemented yet) just once to dismiss the dimming in order to register touch input.
At first, I checked Daydream a bunch of times, enabled it, disabled it, changed settings, and it seemed to have nothing to do with it, because when I did enable Daydream, I got the real screensaver or colored screensaver that I had chosen in the options.
I then disabled auto-brightness, set the manual brightness level to minimum, maximum, and a dozen levels in between, and I still got the dimming that required a single tap to restore use of the screen and brought the brightness back up to its normal level.
I made a bunch of power saving changes, enabled, disabled, to no avail.
Three factory resets later, (tested with no installed apps) I still have the same behavior. It seems like there is a setting that is enabling some sort of screen saver (that only dims the screen to about 50% of the set brightness level, but disables interaction from the user until the screen is tapped a single time) that is dismissed with that single tap.
I've gotten used to it, but it's really infuriating, especially in the car when I have it mounted on the dash for things like GPS, streaming audio (I just want to be able to see what song is playing if it's a new album), and other things that require a glance over to the phone. Sadly, in the car is probably the worst time for the dimming, since the ambient light outside makes the screen appear off when this "feature" kicks in.
I've spent a great deal of time searching/reading threads not only here, but on other mobile forums as well, and I cannot even find a reference to this issue that behaves the same way mine does.
This is my Hail Mary in the hopes that I really have missed something simple.
Thanks in advance for any ideas!

Disabling standby/sleep entirely for Tasker AutoRemote

Short version:
Is there a way, with or without root, to completely disable standby/sleep mode on an Android tablet?
Long version:
I have a Pixel C tablet (running Android 7.1). I've written a set of Tasker profiles and tasks that wait for IFTTT Maker messages via AutoRemote and then act on them. I've got these profiles and tasks running on the Pixel C tablet, and am invoking various IFTTT activities from my and my wife's phones. Basically, the Pixel C tablet is acting as a home automation server that's commanded by IFTTT via AutoRemote.
I've noticed that it works well (~5 second delay) when the tablet screen is on. That delay is the time it takes to go out to IFTTT and back, and is acceptable. But when screen is off, it can take a long time to respond to the IFTTT commands (sometimes a minute or more). I know it's not the Internet itself, because when I unlook it's screen, I'll sometimes see a bunch of toast AutoRemote toast messages show up from a while ago that I sent while it's screen was off. I'm assuming this has to do with the tablet's standby/sleep mode. I've set both Tasker and AutoRemote to not do battery optimization, which I thought would keep those processes from dozing off. But that didn't fix things.
If needed, I'd be willing to have the tablet never go into any type of standby mode, even if that required root. I don't use the tablet much for other purposes, it's usually just plugged in sitting on a desk. Does anyone know of a way to fully disable sleep mode like that, or at least prevent all processes related to Tasker/AutoRemote/incoming IFTTT messages from sleeping?
Thanks,
Joe

GPS seems to enter sleep when the screen is off

Hi,
I often use the RunKeeper application when I make long walks. In all my previous phones, the GPS kept working when I turned off the display and put the phone in my pocket. In the mi 5, however, it seems like the GPS stopped functioning as soon as I turn off the display put the phone in my pocket. When I take it back out, it shows the same position that I was at when I put the phone in my pocket, and within a few seconds it is updated to my actual position.
Has anyone else experienced this? Is this a matter of settings (maybe even permissions)? Same happens with navigation apps like Waze - if I put another application to run in the foreground, such as Youtube, then Waze (while still working in the background) loses my location, and when I switch back to it after some time, it takes a few seconds to show me my new location.
Thanks,
Shlomy
Hi,
This has happened to me also while using the Starva app and the reason is MIUI doesn't allow to use the Location in Background.
To allow that, go to
Settings -> Battery & Performance -> Power -> App Battery Saver
and select the app you want. Then you'll see that Background location is Restrict. Make it Allow and you're good to go.
Regards,
Samitha
Thanks so much! Almost got me to try custom roms because of that.

Do not disturb

Hey guys. Loving my note 8. I do have an issue. When watching videos, I lose sound. I discovered that the do not disturb button is enabled. I disable it and hours later it activates itself, without any input. If anyone has had the same issue, let's talk.
Sent from my SM-N950U using Tapatalk
You don't by chance have the Do not disturb option "Turn on as scheduled" activated in your settings do you?
This is happening to me as well, in the afternoons the 'DO NOT DISTURB' 'Enable now' setting is automatically turned on
My 'Enable as schedule' setting is turned off.
I have also noticed my DND randomly turns on, and then it takes me several times of attempting to turn it off before it will finally stay off. This sometimes happens several times a day. I do have a schedule in place, but my settings within that also fall out - such as allowing alarms or my favorites. The alarm option will stay stuck in the off position until I end up having to restart the phone. Once the phone restarts then I can make the changes I want, but not sure why I have to keep doing this. My fear is that this setting will switch while I'm sleeping causing an alarm to not go off or I'll miss an emergency call. I could just not use this feature, but I really like it and wish it would work correctly. I never had this issue on my S7
I am having the same problem after the most recent update. DND turns on all by itself every afternoon.
I tried using the schedule figuring it might force it to do what I WANT it to do, to no avail. It still automatically turns on every afternoon?
This issue even happens in Safe Mode

Categories

Resources