Toggle Samsung Smart Stay with Tasker - Tasker Tips & Tricks

I'd like to know if anyone can help me out with toggling Smasung Smart Stay with Tasker. I haven't found any solution to make it happen (not including outdated SmartTools plugin).
Thanks.

Describe how this is done manually. Is there a shortcut, quick setting toggle or do you have to open an app?
This being a Samsung special feature, it's unlikely there is an intent to do what you want so your probably stuck using a shell action with an input tap command or the auto input plugin.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers

Yeap, seems like I'll need to use Auto Input (Settings -> Advanced features -> Smart stay (toggle)). I was just hoping there is a working plugin to set it "directly" (without visual actions). An adb/shell command is a good option too ...

allidea said:
Yeap, seems like I'll need to use Auto Input (Settings -> Advanced features -> Smart stay (toggle)). I was just hoping there is a working plugin to set it "directly" (without visual actions). An adb/shell command is a good option too ...
Click to expand...
Click to collapse
A quick search of google before I posted didn't turn up anything. Since I don't use Samsung devices, I have no way to explore for you. The only thought I have is maybe a "settings get/settings put" action might exist. This is a typical way to replace secure settings actions on MM and above. You'd have to explore if that's an option on your device . This redid post should help.
Else, maybe it can be added to the auto tools plugin. You could ask at their forum.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers

Thanks for your efforts. If I manage to find corresponding SmartStay setting name this could be easily solved.

Related

Tethering on Android Oreo. Is it possible?

Hi.
I would like to know how to turn tethering on and off on Android 8 (Oreo). I followed the instructions: I installed the plugin toggle tethering and rebooted the system, but when I activate the task me this error appears:
12.50.56/E FIRE PLUGIN: Toggle Tethering / com.twofortyfouram.locale.intent.action.FIRE_SETTING: 3 bundle keys
12.50.56/E Toggle Tethering: plugin comp: com.matejdro.taskertethercontrol/com.matejdro.taskertethercontrol.TaskerReceiver
12.50.56/E add wait type Plugin1 time 7
12.50.56/E add wait type Plugin1 done
12.50.56/E add wait task
12.50.56/E Error: null
12.50.56/E java.lang.reflect.InvocationTargetException: null
java.lang.NullPointerException: OnStartTetheringCallback cannot be null.
Can somebody help me?
I would love to know the answer to this as well
thebaum said:
i would love to know the answer to this as well
Click to expand...
Click to collapse
yes i have same proble need support
Before any app could toggle tethering, it must work manually. That is what you'll need to sort out first.
Then the app had to be updated for changes.
If you are able to manually toggle tethering, you probably can use AutoInput to toggle it until apps catch up to O.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers

Setting pin when away from home? Not quite working.

I have a profile to set a pin code when I am not near my home WiFi, using Secure Settings. It seems to work except the pin doesn't activate until I unlock the screen and relock it. Is there another step I need to have tasker do to jump start this.
Sent from my SM-T820 using Tapatalk
That's expected behavior. You can leave the pin always set and use a tasker shell action to set the lock screen timeout to a ridiculously long period at home. The command with a 10 day time out would look like:
settings put secure lock_screen_lock_after_timeout 86400000
Then the exit task would set the timeout back to a sane number:
Settings put secure lock_screen_lock_after_timeout 5000
notenoughtech.com has a write-up on using the shell in tasker to replace secure settings.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Thanks. Unfortunately looks like that requires root. My phone is unrootable last I checked into it.
It actually does work once I turn screen on and back off since setting pin doesn't require root. Next step I'm going to see if having tasker turn the screen on and back off after setting the pin.
Disabling the pin when I'm back home works without issue.
Sent from my SM-T820 using Tapatalk
The AutoTools (paid) plugin for Tasker has a secure settings replacement. It doesn't require root, but gets permissions set through ADB commands.
In the tasker action:
plugins -> autotools -> secure settings
You can configure:
lock screen -> automatic lock
And set the time out for the lock screen similar to what I did above. It basically sets the same command I'm doing through the shell but doesn't require root.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
in my experience, this plugin Profile Shortcuts for LineageOS is the best to achieve this Secure Settings or AutoTools, you will have to depend on your ROM though, and cannot backup the profile.
Create 2 system profiles, leave everything unchanged, just use
Don't ask for PIN or password
and
Use system default
As Android is getting more and more 'secured', we user have less options to mess around on a system level. This method uses native system function, do it should work without problem.

Tasker - Can I disable immersive mode with tasker when keyboard is up?

Hey guys, complete noob here. I am using immersive mode on my S8+ which is pretty bugged. I still want to use it because of the beautiful screen.
Problem is: when I open the keyboard in many apps the written text isn't pushed up like usual but behind the keyboard. I'd love to know if I can make tasker switching my phone from immersive to normal mode when the keyboard is open and back to immersive mode when I close it.
Gesendet von meinem SM-G955F mit Tapatalk
Yes, using the AutoInput plugin in the triggering profile, you can sense when an input box is in/out of focus. That will correspond to the keyboard being launched/closed.
Tasker profile ->Event -> Plugin –> AutoInput –> UI Action
Enter the AutoInput UI Action configuration (pencil icon) -> Action Types and select both Select Input Element Focused and Input Element Focus Lost. (*1)
Save the profile and create a task which toggles the immersive mode. You might start the task by flagging a message "keyboard toggled" so you can make sure the profile is triggering when you want.
I use the AutoTools secure settings plugin to toggle the immersive mode in my tasks.
(*1) alternatively use two separate profiles, one with only Select Input Element Focused checked and the associated task to exit immersive mode. The second with only Input Element Focus Lost checked and the associated task to enter immersive mode.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
Yes, using the AutoInput plugin in the triggering profile, you can sense when an input box is in/out of focus. That will correspond to the keyboard being launched/closed.
Tasker profile ->Event -> Plugin –> AutoInput –> UI Action
Enter the AutoInput UI Action configuration (pencil icon) -> Action Types and select both Select Input Element Focused and Input Element Focus Lost. (*1)
Save the profile and create a task which toggles the immersive mode. You might start the task by flagging a message "keyboard toggled" so you can make sure the profile is triggering when you want.
I use the AutoTools secure settings plugin to toggle the immersive mode in my tasks.
(*1) alternatively use two separate profiles, one with only Select Input Element Focused checked and the associated task to exit immersive mode. The second with only Input Element Focus checked and the associated task to enter immersive mode.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
I tried that, everytime I open the keyboard I get a notification that Autotools don't have permissions to change system (which I granted it, however...)
I am using Gboard btw.
Gesendet von meinem SM-G955F mit Tapatalk
Did you grant the WRITE_SECURE_SETTINGS permission via ADB?
adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
If the device is rooted, you can use a terminal app and do the same thing without ADB
$ su
# pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
Did you grant the WRITE_SECURE_SETTINGS permission via ADB?
adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
If the device is rooted, you can use a terminal app and do the same thing without ADB
$ su
# pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
Nice! Works now Thank you!
Gesendet von meinem SM-G955F mit Tapatalk
Maybe you can help me with another problem as well. Some text fields (in chrome and most samsung apps) are not recognized as such, which mean that my tasker profiles are not triggered. (I also have some navigation bar tasks to have cursors appear when input is detected.
Is there a way to force the input detection? Everytime the keyboard is open?
Gesendet von meinem SM-G955F mit Tapatalk
The profile you just set-up is not triggered in these cases? If it is triggered, then use the same AutoInput UI Action for your navigation bar cursor task.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
The profile you just set-up is not triggered in these cases? If it is triggered, then use the same AutoInput UI Action for your navigation bar cursor task.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
Nope, both are not triggered. I attach two screens to this post (one with triggered and one with not triggered profiles. Non of my modifications that are triggered when input is detected (black navigation bar, cursors and immersive mode toggle) work in the second example.
https://imgur.com/a/Z20Vh
https://imgur.com/a/Ar9Sn
Gesendet von meinem SM-G955F mit Tapatalk
I see exactly what you're talking about. If you tap in the url field, the task is triggered, but tap in the google search field and it's not.
I spent a bit of time watching a logcat today trying to see where the call is made for the keyboard. I'm not a programmer so it's possible I missed it, but it's not obvious over the short bit of time I put into it.
That's what it's going to take is figuring out how the keyboard is called. Honestly, it might be easier to all over in the tasker google group. That's where Pent hangs out. Plus there are some very knowledgeable folks over there.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers

Greyscale display mode on Note 9 Pie variant

When I had a OnePlus I would use it's greyscale display feature quite often, very useful for power saving etc.
I am aware that within Google devices running Pie that a greyscale option is available along with Do Not Disturb.
This feature does not appear to be ported over the the Samsung Note 9, which is a shame.
Does anyone know of a third party app or Tasker feature that could enable greyscale mode on the Note 9 where required?
Thx
You can enable Monocromacy in the Simulate colour space option in Dev options and probably get a similar effect.
Go to settings -> accessibility -> visibility enhancements -> colour adjustment , turn it on and select greyscale.
baferdi said:
Go to settings -> accessibility -> visibility enhancements -> colour adjustment , turn it on and select greyscale.
Click to expand...
Click to collapse
Many thanks for the tip. This achieves the desired result but is a bit fiddly, do you know if this is accessible via Tasker, or does a shortcut exist?
KevQuoi said:
Many thanks for the tip. This achieves the desired result but is a bit fiddly, do you know if this is accessible via Tasker, or does a shortcut exist?
Click to expand...
Click to collapse
I made my own Tasker task shortcut on the main screen for this purpose.
The task only uses one action:
Add action -> Settings -> Custom setting
Type: Secure
Name: accessibility_display_daltonizer_enabled
Value: =:=toggle=:=
If it doesn't work for you, you can try finding the correct custom action with built-in Find function.
I see you got an answer regarding tasker. I can't help with tasker cause I've been too lazy to dig into it yet
KevQuoi said:
Many thanks for the tip. This achieves the desired result but is a bit fiddly, do you know if this is accessible via Tasker, or does a shortcut exist?
Click to expand...
Click to collapse
Under the accesibility settings go to advanced settings, from there you can set the power + vol up shortcut to control the monocromacy. I've gotten quite used to this function on a OnePlus 6 and have been using it this way on the Note 9.
I think the OP6's reading mode gave it a yellowish, e-reader like tint though, which made it better imo.

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.

Categories

Resources