Active Display not respecting "midnight mode" - Moto X Q&A

I am curious as to why they have this mode on there that isn't followed at all..
Is there a way to disable it from a shell command? I'll just have Tasker take care of it.

Related

[Q] Auto airplane mode with Nougat (AutoTools or similar)?

Hi,
I noticed it's possible to grant special permissions using ADB to unlock AutoTools Secure Settings (see here).
I saw a demonstration of auto GPS on/off without root and without the "automatic click path" (as we see in Greenify and AutoInput actions), is it possible to have the same behaviour for airplane mode? A simple toast notification instead of the complex path, which needs screen on and unlocked phone.
I hope I've explained well what I want to say.
Look at http://forum.xda-developers.com/showpost.php?p=68495077&postcount=3 No Secure Settings, AutoTools etc.
For me - it works (on Nougat SlimRom 7 on HTC One 7).
It seems it needs root.
DeX1009 said:
It seems it needs root.
Click to expand...
Click to collapse
Of course... It can't be done without a root.
Unlocking AutoTools Secure Settings through ADB allows users to turn on/off GPS, and GPS can't be switched without root...

Changing Display Mode (Galaxy S8+ Adaptive/AMOLED Photo) when launching an app?

I have a Galaxy S8+. I use AMOLED Photo display mode, mostly because when I tweak a photo in Instagram, Snapseed,or Lightroom, I like it to be a fairly accurate representation on my phone's display, as the default Adaptive mode is oversaturated. But at other times, the Adaptive mode can look rather nice.
So what I'd like to do is when I launch something like Instagram or Snapseed, is to have Tasker switch the display mode to AMOLED Photo, and change back to Adaptive when I close the app.
It's a basic setting. Settings > Display > Display Mode > and you choose from one of 4 options with a radio button for each.
I tried using AutoInput, by using it to open display settings, then clicking display mode, then clicking AMOLED Photo. This is clunky, and slow, and the settings windows show on screen. And I then have to dismiss the settings window. Is there a way I can toggle that specific setting directly using some kind of plugin, without having to simulate all the key presses? Or have it change behind the scenes, not actually on screen?
Perhaps a shell command would work, if it has a specific system shell command? Is there a way to determine or interrogate if there is any kind of shell command?
Thanks!
the_scotsman said:
I have a Galaxy S8+. I use AMOLED Photo display mode, mostly because when I tweak a photo in Instagram, Snapseed,or Lightroom, I like it to be a fairly accurate representation on my phone's display, as the default Adaptive mode is oversaturated. But at other times, the Adaptive mode can look rather nice.
So what I'd like to do is when I launch something like Instagram or Snapseed, is to have Tasker switch the display mode to AMOLED Photo, and change back to Adaptive when I close the app.
It's a basic setting. Settings > Display > Display Mode > and you choose from one of 4 options with a radio button for each.
I tried using AutoInput, by using it to open display settings, then clicking display mode, then clicking AMOLED Photo. This is clunky, and slow, and the settings windows show on screen. And I then have to dismiss the settings window. Is there a way I can toggle that specific setting directly using some kind of plugin, without having to simulate all the key presses? Or have it change behind the scenes, not actually on screen?
Perhaps a shell command would work, if it has a specific system shell command? Is there a way to determine or interrogate if there is any kind of shell command?
Thanks!
Click to expand...
Click to collapse
I dont know about plugins, but you can check if there is a setting or intent regarding the display mode.
Run the following commands in terminal to see if there is a setting regarding display mode.
Code:
[B][COLOR="Blue"]# You can also write something like: settings list system > tasker.txt[/COLOR][/B]
settings list system
settings list global
settings list secure
[/HIDE]
You can change the settings which youve got from previous commands by using those commands:
Code:
[B][COLOR="Blue"]# Get the value/status of a setting[/COLOR][/B]
settings get global name_of_setting — returns status of setting (such as 1 = enabled, 0 = disabled)
[B][COLOR="Blue"]# Change the value/status of a setting[/COLOR][/B]
settings put global name_of_setting 0 — disables setting
settings put global name_of_setting 1 — enables setting
settings put system ...
settings put secure ...
[/HIDE]
You can also check if there is any intent for display mode in Settings.apk by using Manifest Viewer which shows the AndroidManifest.xml of every apk (where the intents are defined or something).
If there is a setting for display mode or if there is a intent, then its quite easy to set up a Tasker profile to achieve what you want.
You can also try to ask on Reddit ( /r/tasker ) since there are some people with good knowledge and /r/tasker is more popular than here on xda.
Thanks for your reply. You were on the right track. I had also asked on the Tasker Reddit.
But I need root to do what I want, and I'm not prepared to lose the warranty on my S8+ just yet.
Thanks anyway

Location settings

Guys anyway to switch between location modes in Tasker.
I'm rooted and GPS on/off doesn't seem to work.
That would be because gps on/off no longer exists. You need to switch locating mode to high accuracy or device only from battery saving.
IMHO, it's easiest to do this using AutoTools' secure setting. This task on the AutoTools forum would get you started.
It can also be done by modifying the secure setting entry using a tasker shell command such as:
This command disables:
settings put secure location_providers_allowed ' '
This command enables:
settings put secure location_providers_allowed gps,wifi,network
You should read through Not Enough Tech's shell commands post to get an idea what's happening with this type of command.

How to activate/deactivate a qs tile upon screen off/on?

In android 10,a new feature called as TURN ALL SENSORS OFF is available in developer settings. It also has a qs tile.
Is there a way to automatically enable this feature upon screen off and then disable upon screen on?
The obvious answer is absolutely yes using AutoInput to emulate the touches. That can also be done with more effort using just built in Tasker actions.
However, it's possible (likely?) That there is a secure setting that controls this action. You can sort that out by comparing the secure settings before and after toggling the tile. The AutoTools secure settings action has an assistant that may help you sort this out.
ktmom said:
The obvious answer is absolutely yes using AutoInput to emulate the touches. That can also be done with more effort using just built in Tasker actions.
However, it's possible (likely?) That there is a secure setting that controls this action. You can sort that out by comparing the secure settings before and after toggling the tile. The AutoTools secure settings action has an assistant that may help you sort this out.
Click to expand...
Click to collapse
1) In android 10,there is an option to disable all sensors in developer options. So i turned it on last night, and battery drain was less than 2 % in 4 hrs, compared to 1% per hour usually, with volte and 4g data on. I would get more accurate stats later on.
There's a qs tile available to activate it.
What I want to ask is, is there a way to automatically enable it every time the screen goes off, and then disable it when screen goes on, without any user input?Either as a shortcut or as a qs tile.
2) I am afraid i don't have enough knowledge to exactly understand the steps you are telling. Do you know of a pre made recipe to execute this. I tried to search but in vain. Or if you are on android 10,maybe you can try doing what i need.
Thank you.
There are loads of tutorials available to use the AutoInput plugin.
As far as issuing the native tasker custom setting action;
Create a new task
Add a Settings -> Custom Setting action
A developer settings action is probably a global setting but you may have to explore
When you are in the configuration for the Custom Setting action, use the magnifying glass and Find to identify the setting you want. A pop-up will appear directing you to ok out of the instructions then go to the setting you want to manage, activate the setting and return to Tasker. Then hit the magnifying glass again and if the setting was identified, it will display in the pop-up where you can select it.
No offence, even if I were on A10, this can be done with a basic understanding of Tasker so I wouldn't create a project for it. If you are still unsure what to do, please take the time to work through some basic tasker tutorials to gain familiarity with the app.
ktmom said:
There are loads of tutorials available to use the AutoInput plugin.
As far as issuing the native tasker custom setting action;
Create a new task
Add a Settings -> Custom Setting action
A developer settings action is probably a global setting but you may have to explore
When you are in the configuration for the Custom Setting action, use the magnifying glass and Find to identify the setting you want. A pop-up will appear directing you to ok out of the instructions then go to the setting you want to manage, activate the setting and return to Tasker. Then hit the magnifying glass again and if the setting was identified, it will display in the pop-up where you can select it.
No offence, even if I were on A10, this can be done with a basic understanding of Tasker so I wouldn't create a project for it. If you are still unsure what to do, please take the time to work through some basic tasker tutorials to gain familiarity with the app.
Click to expand...
Click to collapse
Will follow the steps. If I encounter any issues, will reply back here.
Big thanks.

Tasker keep screen on Android 12 issue

Hi,
I have set up the display timeout option with the settings below but it doesn't seem to work. I am using an oppo phone on Android 12.
Create a new task. Select the “+” button. Select “Display” followed by “Display timeout” Select the time span you want to set and then save. Now select “Profile” and click “+” and then “Applications” Mark the applications for which you want to activate this Tasker profile.
Then I open the app but after 15 seconds the screen turns off which is the default device screen timeout.
Is there no way to override this? Maybe get tasker to somehow keep interacting with the screen to keep it on?
I've tried this on a few apps and have got two different messages..
One says screen will stay on for 15 seconds which is the system screen time out.
Other says tasker will keep screen on but still times out after 15 seconds.
Really want this to work as some apps like games I don't want timing out after 15 seconds and I don't want to increase the system time to couple of mins for every app.
Hi,
I have the same problem on my OPPO A74 with Android 11 ((ColorOS Version V11.1). It seems impossible to create a task to change the screen time out; not in connection with a profile, shortcut or widget. The amazing thing, though - when you test the task in Tasker it works perfectly fine.
Media Volume, I think, also doesn't work. Other app connected profiles like autorotate or display brightness work well. I wanted to test more but I can't find the time.
I really miss the screen timeout though. It drains the battery too much to set it constantly to 15 minutes or so, but for some apps less simply is annoying.
The developer created some apk to help with some OPPO related problems, unfortunately, it didn't help with this one (sorry, I can't remember exactly what it was).
A kind of workaround: Once you've activated the Developer Options an your phone you can enable "Keep screen on while charging". When you need longer screen time, just plug into a charger.
But using a Tasker Profile would be much nicer.
Hope somebody knows a better trick.
Not sure if following could help your situation ( only for your gaming situation )
Create a new Profile, choose > apps > add your game apps in it. click left top arrow when finisning add gaming apps.
Tasker will pops-up task list > creat new task > Screen > Turn on.
** when above profile is complete , click the task when you are still in Profile list. Hold the task, it should pops-up with option exit task. Choose this as exit task.
Play around to see if this profile is working when gaming apps in foreground, screen never turn off.
EDIT: Try first not move the task as exit task. ( make the task as normal entry task )
eeeemc said:
Not sure if following could help your situation ( only for your gaming situation )
Create a new Profile, choose > apps > add your game apps in it. click left top arrow when finisning add gaming apps.
Tasker will pops-up task list > creat new task > Screen > Turn on.
** when above profile is complete , click the task when you are still in Profile list. Hold the task, it should pops-up with option exit task. Choose this as exit task.
Play around to see if this profile is working when gaming apps in foreground, screen never turn off.
Click to expand...
Click to collapse
Thanks for your reply.
Creating the profile is not the problem. It just seems that Tasker cannot change the system's setting. As mentioned, there is no problem when you create a profile allowing the screen to rotate using a speciffic app (and others as well ) I have no idea, why it does not work for the screen timeout.
Dreamcatcher0664 said:
Thanks for your reply.
Creating the profile is not the problem. It just seems that Tasker cannot change the system's setting. As mentioned, there is no problem when you create a profile allowing the screen to rotate using a speciffic app (and others as well ) I have no idea, why it does not work for the screen timeout.
Click to expand...
Click to collapse
I use no screen timeout, I use "screen turn on" in your situation as my op., enough I've not tried it on my Samsung A71.
eeeemc said:
I use no screen timeout, I use "screen turn on" in your situation as my op., enough I've not tried it on my Samsung A71.
Click to expand...
Click to collapse
"Display / turn on" works fine when I want the screen to turn on with a notification. But the screen turns dark after the system timeout has passed. I've also tried "Display / Stay On / with Wireless, AC or USB Power" and with the AutoInput Plugin "Screen Off Or On: Turn On / Timeout Never" but the screen always turns dark.
Those Profiles always worked on my other Smartphones (LG -D405, LG-K10 and Moto G6). I believe, it's the ColorOs that's causing the trouble.
Dreamcatcher0664 said:
"Display / turn on" works fine when I want the screen to turn on with a notification. But the screen turns dark after the system timeout has passed. I've also tried "Display / Stay On / with Wireless, AC or USB Power" and with the AutoInput Plugin "Screen Off Or On: Turn On / Timeout Never" but the screen always turns dark.
Those Profiles always worked on my other Smartphones (LG -D405, LG-K10 and Moto G6). I believe, it's the ColorOs that's causing the trouble.
Click to expand...
Click to collapse
below is a task ONLY FOR ROOTED DEVICE., no harm to try even if your's not root.
New task , run shell command , in the command input
there is a button 'use root' , check that button also.
settings put system screen_off_timeout 200000
** 200000 I'm not sure sure equals to how many second., just give it a try and if you get a longer screen on time from your issue it means it is working.
also, make another separate task, search for 'custom setting'. look up from there I thingk it is in system something about screen timeout.
EDIT: run shell command task suggest you run it manually., than see if it works. if not, restart device to check if it requires a restart in order to accept new timeout settings.
eeeemc said:
below is a task ONLY FOR ROOTED DEVICE., no harm to try even if your's not root.
New task , run shell command , in the command input
there is a button 'use root' , check that button also.
settings put system screen_off_timeout 200000
** 200000 I'm not sure sure equals to how many second., just give it a try and if you get a longer screen on time from your issue it means it is working.
also, make another separate task, search for 'custom setting'. look up from there I thingk it is in system something about screen timeout.
EDIT: run shell command task suggest you run it manually., than see if it works. if not, restart device to check if it requires a restart in order to accept new timeout settings.
Click to expand...
Click to collapse
I feel like I'm in Star Trek - "To boldly go, where no one has gone before" XD
When I try your suggestion, I only receive the message that my device isn't rooted.
Btw, for some tasks it is necessary to enable the Write Secure Setting Permission (f.e. Set Assistant), where xou have to setup ADB on your PC. Would such a procedure be registered by the phone as rooting? Anyway, I don't think I would dare to do something I know so little of.
Another solution I was thinking of, is it possible to create a tasker quick tile/ quick setting to change the system screen timeout.
So instead of having it change for certain apps which isn't working at the moment.
Maybe if we can change it from the system so will be for all apps. You can create two separate quick tiles to toggle between different screen timeout settings.
The newest version of Tasker (6.0.9) comes with Tasky.
Tasky offers the possibility to activate premade profiles. One of them is "Keep Display Awake For Apps". And that one works with my OPPO Phone.
I also tried "Auto-Mute Apps", another profile I couldn't get working. It also works fine.
To switch between Tasker and Tasky you just have to click on the "Three-Dots-Button" in the right top corner. It's not like switching apps but using different user interfaces.
Good luck!
- Sorry to say, but this seems to work for some apps and not for others. But at least sometimes it does work.
Thanks for replying back to this thread to inform me. I tried it and it works for the app I was trying to make it work for which is good! Makes it so much easier now.

Categories

Resources