Question: Developer options - Tasker Tips & Tricks

Any way to toggle the override Forced dark mode in android 10 using Tasker on non rooted device?
Sent from my SM-N975U using Tapatalk

Compusmurf said:
Any way to toggle the override Forced dark mode in android 10 using Tasker on non rooted device?
Sent from my SM-N975U using Tapatalk
Click to expand...
Click to collapse
Not (yet) on A10, but if this is a setting in developer options, likely the way to do this unrooted is to use an intent to open the developer option menu, then use emulated touches via AutoInput to make the toggle happen.
Code:
A1: Send Intent [
Action:android.settings.APPLICATION_DEVELOPMENT_SETTINGS
Cat: None
Mime Type:
Data:
Extra:
Extra:
Extra:
Package: com.android.settings
Class:
Target: Activity ]
Edit:
I should point out, using the intent is old school tasker [emoji16]. There is an action under settings -> developer settings.
Edit 2:
Thinking about it, you should be able to set it with the tasker settings -> custom setting action. You may have to give tasker read/write secure settings permissions through ADB first if you haven't already.
Code:
On
A1: Custom Setting [
Type: Secure
Name: ui_night_mode
Value: 2
Use Root: Off
Read Setting To: ]
Off
A2: Custom Setting [
Type: Secure
Name: ui_night_mode
Value: 0
Use Root: Off
Read Setting To: ]
Check value
A3: Custom Setting [
Type: Secure
Name: ui_night_mode
Value:
Use Root: Off
Read Setting To: %dark_mode ]
A4: Flash [
Text:dark_mode: %dark_mode
Long: On ]

ktmom said:
Not (yet) on A10, but if this is a setting in developer options, likely the way to do this unrooted is to use an intent to open the developer option menu, then use emulated touches via AutoInput to make the toggle happen.
Code:
A1: Send Intent [
Action:android.settings.APPLICATION_DEVELOPMENT_SETTINGS
Cat: None
Mime Type:
Data:
Extra:
Extra:
Extra:
Package: com.android.settings
Class:
Target: Activity ]
Edit:
I should point out, using the intent is old school tasker [emoji16]. There is an action under settings -> developer settings.
Edit 2:
Thinking about it, you should be able to set it with the tasker settings -> custom setting action. You may have to give tasker read/write secure settings permissions through ADB first if you haven't already.
Code:
On
A1: Custom Setting [
Type: Secure
Name: ui_night_mode
Value: 2
Use Root: Off
Read Setting To: ]
Off
A2: Custom Setting [
Type: Secure
Name: ui_night_mode
Value: 0
Use Root: Off
Read Setting To: ]
Check value
A3: Custom Setting [
Type: Secure
Name: ui_night_mode
Value:
Use Root: Off
Read Setting To: %dark_mode ]
A4: Flash [
Text:dark_mode: %dark_mode
Long: On ]
Click to expand...
Click to collapse
That's regular night/dark. In 10 there is another called. FORCED DARK. After spending an hour digging thru global and system areas I see nothing for forced dark there unless it has a different name. I will dig some more.
Sent from my SM-N975U using Tapatalk

You shouldn't have to dig. Use the built-in tasker custom setting action, then on the name field, tap the magnifying glass for help to find the setting.

ktmom said:
You shouldn't have to dig. Use the built-in tasker custom setting action, then on the name field, tap the magnifying glass for help to find the setting.
Click to expand...
Click to collapse
Cool feature. Says nothing found. Will poke around some.
Sent from my SM-N975U using Tapatalk

Related

Open app profile without Tasker accessibility services

Hello!
I have a question about profile to execute task when opening or closing app without accessibility services turned on.
So I want my phone to automatically do some stuff when I open a particular app.
Is is possible to detect app open or close without enabling Tasker accessibility sercice.
Why I want this? I have Nexus 5x rooted with TWRP, so I want encryption enhanced with my password, which is not possible when one have any accessibility service enbled.
So, is there a way to detect app opening or closing without tasker accessibility service?
Thank you!
How experienced are you? You can use this as a guide, but since oom_adj values behave differently for other devices, you'll need to take the concept and modify it to your needs...but yes, you can create your own looping task to detect the launch or closing of any app. Here's how I detect that Tasker has closed:
Code:
Detect Tasker (355)
Run Both Together
A1: Variable Set [ Name:%newline To:
Do Maths:eek:ff Append:eek:ff ]
A2: Variable Set [ Name:%space To: Do Maths:eek:ff Append:eek:ff ]
A3: Run Shell [ Command:ps Timeout (Seconds):0 Use Root:eek:ff Store Output In:%apps Store Errors In: Store Result In: ]
A4: Variable Split [ Name:%apps Splitter:net.dinglisch.android.taskerm Delete Base:eek:ff ]
A5: Variable Split [ Name:%apps1 Splitter:%newline Delete Base:eek:ff ]
A6: Variable Set [ Name:%last To:%apps1(#) Do Maths:eek:ff Append:eek:ff ]
A7: Variable Set [ Name:%taskerpidline To:%apps1(%last) Do Maths:eek:ff Append:eek:ff ]
A8: Variable Split [ Name:%taskerpidline Splitter:%space Delete Base:eek:ff ]
A9: Variable Set [ Name:%taskerpid To:%taskerpidline4 Do Maths:eek:ff Append:eek:ff ]
A10: Run Shell [ Command:cat /proc/%taskerpid/oom_adj Timeout (Seconds):0 Use Root:eek:ff Store Output In:%oom Store Errors In: Store Result In:%Aresult ]
A11: Flash [ Text:%oom Long:eek:ff ]
A12: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A13: Goto [ Type:Action Number Number:1 Label: ] If [ %oom < 2 ]
A14: Write File [ File:DetectTasker/shutdownlog.txt Text:%DATE %TIME Append:eek:n Add Newline:eek:n ]
You'll need to change A4 to the package name you want and insert a flash of %oom in the loop so you can understand how the value behaves for you when opening and closing the app...then change the check on A13 to what works for you. A14 writes a file, so you could use a File Modified context to trigger whatever tasks you want.
Sent from my SM-G928C using Tapatalk
Well, to be honest, I am not that experienced, and this is a bit too much for me.
Specifically I want to automatically execute some tasks when opening and closing Nexus 5x Camera app (stop music playing when opening and opening Snapseed when closing and other). I know that this is not very serious life dependant stuff, but Tasker is all about making life easier ?. Tasks are easy to create, but I am not knowledgeable enough to understand everything you proposed.
Thank you for your effort anyway!
deleted
kurci2 said:
Well, to be honest, I am not that experienced, and this is a bit too much for me.
Click to expand...
Click to collapse
No worries. One of the beautiful things about Tasker is that there's almost always multiple ways to achieve your intended result.
kurci2 said:
Specifically I want to automatically execute some tasks when opening and closing Nexus 5x Camera app (stop music playing when opening and opening Snapseed when closing and other).
Click to expand...
Click to collapse
If you really want this and feel overwhelmed by the shell scripts above, you can probably avoid trying to detect the camera app altogether by making a shortcut out of your task and using it to launch the camera instead of the app icon. Set an icon and save a shortcut to your desktop or whatever that turns off the music and launches the camera. Always use that shortcut icon to open your camera app instead of the camera app's icon.
You could do a variety of things to avoid detecting when the camera closes. You could make a task that runs the tasks you wish to perform when camera closes, then kills the camera itself... And you could display an invisible overlay scene that performs that task when you long press it....or you could use Xposed Additions module to map that task to the Back and Home buttons... Lots of options there.
kurci2 said:
I know that this is not very serious life dependant stuff, but Tasker is all about making life easier ?. Tasks are easy to create, but I am not knowledgeable enough to understand everything you proposed.
Thank you for your effort anyway!
Click to expand...
Click to collapse
Overcoming these kinds of challenges is what helps you master Tasker. [emoji2]
Sent from my SM-G928C using Tapatalk
RuggedHunter said:
Overcoming these kinds of challenges is what helps you master Tasker. [emoji2]
Click to expand...
Click to collapse
Hello again!
I have started to learn tasker, but I am only at basics. For example I configured WiFi ON/OFF based on cell towers around me and I automated SMS backup.
But I am still far away from understanding your script (for example I do not know what to write in "To:" section and I do not know that does ff mean).
Before I had multiple wishes for tasker to do. I wanted it to automatically make all the pictures black and white when would enable that profile, but I found other quick ways with Snapseed and photoshop. After that I wanted automatic photo uploading and then I figured that Google Photos is the greatest of them all and already automatic. Etc.
There is only one thing left that I can not solve without this tasker script. I want to turn off camera sounds. I know about deleting camera sounds in system folder, but if one uses HDR that is not effective, because HDR makes its own sound. Those camera sounds are really annoying to me.
So I am asking you if you can help me to create a tasker profile and task to enable Do not disturb mode when camera app is opened and restore to previous volume setting when camera is closed. I use stock Google Camera on Nexus 5X, and I think this is the best and most straight forward android camera app.
So my question is if you can help me to configure this profile. This is kind of my last thing from Nexus perfetion .
[SOLVED] - Accessibility services and password enhanced encryption
Hello!
I have managed to solve my problem and I want to share it with everyone else who (like myself) does not know this workaround.
Issue description.
So as I mentioned, I have a rooted Nexus 5X with TWRP recovery (like many other here I am sure). As we know, to protect my data form beeing accessible directly via TWRP one must have "Password enhanced encryption". But the problem is, that when one enables any of the Accessibility Services the message pops uot, that the following action will disable "Password enahnced encryption" - unacceplteble security issue for some.
Solutin.
It turn outm that you can easily re-enable "Password during boot" option in security.
Steps:
Settings --> Accessibility --> Enable any of the services you want (Tasker in my case).
You will get the message stating: "If you turn on Tasker, your device won't use your screen lock to enhance data encryption."
For now you just click OK and procede. Note, that your device encryption is now not password enhanced.
It turns out, that one can just re-enable password protected encryption back in security settings.
Settings --> Security --> Screen Lock --> Chosse which one you perfer --> Enable "Reqire password to start device" and voila
You will see a message saying that the service won't be accessible till the device fully boots, but after that everything runs perfectly.
So, that's it.
It turns out, that I actually do not need all these comlicated Tasker scripts after all.
I would like to thank everyone for help. (Reddit source: https://www.reddit.com/r/Android/comments/3vry8k/users_running_lollipop_or_newer_may_be_using_a/)
Hi, I tried Tasker on encrypted device and now I uninstalled Tasker, reboot and TWRP + boot don´t wont PIN. It seems like device is not encrypted now. But in settings - security is "encrypted". How can I fix it? Thanks
---------- Post added at 11:26 AM ---------- Previous post was at 11:17 AM ----------
I can´t find "Password during boot" option. I have Pure Nexus (7.1.1_r21). Now I uninstall Tasker, reboot but TWRP / Boot don´t requite PIN. Settings - security says encrypted. How can I fix it please?

[Question] %PACTIVE not working

Hi,
I'm trying to learn Tasker and now I'm playing with active tasks as conditions. But I cannot seem to get %PACTIVE to play nice.
If I print %PACTIVE(#), it displays '0'.
If I print %PACTIVE(), it displays ''
If I try to set %pactive to %PACTIVE, the content is "%PACTIVE", which I've found means it's empty.
But I have one profile active as we speak. It's green in the profiles list and it's also listed in the nofication area.
Any ideas on how to deal with this?
This variable works with "," if you want to do any matching, such as night mode then it will be something like %PACTIVE ~R ,night mode,
Notice that it has to begin with and end with a ,
%PACTIVE is for active profiles, not for currently running tasks. %PACTIVE only lists those profiles for which you have manually set a name by long pressing the profile and then changing the name. If you did not change the name of a profile from its default name, you cannot use %PACTIVE to check whether that profile is active.
%TRUN contains list of currently running tasks.
Use these two as-is. Don't put brackets. Don't put numbers. %PACTIVE and %TRUN are full names of these variables.
%PACTIVE(#) = 0, because there are 0 items in an array of that name. %PACTIVE is a variable, not an array.
@Sukarn and @HatchetEgg
I'm using %PACTIVE to check for currently running profiles that are listed under the Profiles tab. Is that incorrect?
What I tried now, not that I had much hopes for it, is this:
1. If %PACTIVE ~R ,borte, | %PACTIVE ~R ,Borte,
2. If %PACTIVE ~R ,borte,
3. Flash Text Works for borte
4. End If
5. If %PACTIVE ~R ,Borte,
6. Flash Text Works for Borte
7. End If
8. Else
9. Flash Text Nothing to see here! Go away!
10. End If
Click to expand...
Click to collapse
I also tried "*,borte,*", but that didn't work either. "Borte" is only listed as a profile and not a task (the task it runs has a different name).
In every test, the script jumps to the Else part and displays the go away-message. Which I kind of expected as %PACTIVE ~ "\%PACTIVE".
tiwas said:
@Sukarn and @HatchetEgg
I'm using %PACTIVE to check for currently running profiles that are listed under the Profiles tab. Is that incorrect?
What I tried now, not that I had much hopes for it, is this:
I also tried "*,borte,*", but that didn't work either. "Borte" is only listed as a profile and not a task (the task it runs has a different name).
In every test, the script jumps to the Else part and displays the go away-message. Which I kind of expected as %PACTIVE ~ "\%PACTIVE".
Click to expand...
Click to collapse
1. No that is what %PACTIVE should do, to store currently running profiles running in tasker. It might even be case sensitive as well if I remember correctly.
2. The way you setup your task does not look right to me it should be something like this.
1. If %PACTIVE ~R ,borte, | %PACTIVE ~R ,Borte,
2. Flash Text Works for borte
3. Else
4. Flash Text Nothing to see here! Go away!
5. End If
3. From what I can tell from this variable it will not show its content regardless of flash or popup commands, but they do work even if you can't see it's contents. So use the above as an example, so you can implement it into any task.
HatchetEgg said:
2. The way you setup your task does not look right to me it should be something like this.
Click to expand...
Click to collapse
It's basically the same, as far as I can see. You only removed the nested If to tell me if the variable is case sensitive or not. With indentations, my code would be:
1. If %PACTIVE ~R ,borte, | %PACTIVE ~R ,Borte,
2. ... If %PACTIVE ~R ,borte,
3. ... ... Flash Text Works for borte
4. ... End If
5. ... If %PACTIVE ~R ,Borte,
6. ... ... Flash Text Works for Borte
7. ... End If
8. Else
9. ... Flash Text Nothing to see here! Go away!
10. End If
Lines 2 and 5 are just to pick up which one matched - or both, if that's the case. If none of them match, the Else is triggered. Or do you see any other problems?
HatchetEgg said:
3. From what I can tell from this variable it will not show its content regardless of flash or popup commands, but they do work even if you can't see it's contents. So use the above as an example, so you can implement it into any task.
Click to expand...
Click to collapse
Well, it still doesn't enter the first if statement for some reason...
tiwas said:
It's basically the same, as far as I can see. You only removed the nested If to tell me if the variable is case sensitive or not. With indentations, my code would be:
1. If %PACTIVE ~R ,borte, | %PACTIVE ~R ,Borte,
2. ... If %PACTIVE ~R ,borte,
3. ... ... Flash Text Works for borte
4. ... End If
5. ... If %PACTIVE ~R ,Borte,
6. ... ... Flash Text Works for Borte
7. ... End If
8. Else
9. ... Flash Text Nothing to see here! Go away!
10. End If
Lines 2 and 5 are just to pick up which one matched - or both, if that's the case. If none of them match, the Else is triggered. Or do you see any other problems?
Well, it still doesn't enter the first if statement for some reason...
Click to expand...
Click to collapse
Ah ok I understand why you did it that way, Also thanks for pointing this issue out, because by the looks of it, when I checked my profiles that use this global variable, they don't work correctly either! And I had those profiles for about 2-3 years, without any changes.
This would seem to suggest to me that this is a bug that needs to be reported to the dev.
UPDATE
I found out what the problem is! I disabled amplify and now %PACTIVE now works and even reports the actual data now

How to disable pattern lock screen with Tasker.

Hi! I know that this has been asked before but nothing has worked so far and I need help!
I am running tasker 4.9u1 on an LG G5 with android 7.0 Nougat. What I am trying to do is create a widget or button that will allow me to toggle my lock screen on and off, via keyguard toggle or any other method. The G5 variant that I have does not yet have root otherwise this would be a breeze. I have just a regular pattern lock screen. If yall know how to help me I would really appreciate it. Thanks.
brune
This method works for me, hope it helps you. https://forum.xda-developers.com/u/tasker-tips-tricks/guide-disable-pattern-pin-password-lock-t3663485
Like most things with programming/tasker there are several ways to achieve the same goal.
After creating your trigger profile, create an enter task to disable secure lock screen (sets the secure lock screen to engage 1 day after screen off = 86400 seconds, or 10 days after screen off = 864000 seconds)
Code -> Run Shell [
Command:settings put secure lock_screen_lock_after_timeout 86400
Timeout (Seconds):30
Use Root: on
Store Output In:
Store Errors In:%UnLockScreenError
Store Result In:
Continue Task After Error: on
]
Create an exit task to enable secure lock screen (sets the secure lock screen to engage 1 minute after screen off = 3600 seconds).
Code -> Run Shell [
Command:Settings put secure lock_screen_lock_after_timeout 3600
Timeout (Seconds):0
Use Root: on
Store Output In:
Store Errors In:%LockScreenError
Store Result In:
Continue Task After Error: on
]
To better understand using root shells to modify secure settings see Replace Secure Settings with Shell Commands

[Help] Combine AOD & Ambient Display

Hi everyone!
I'd like to have a new feature to my S7 Always on Display, kind of like Motorola did with their Ambient Display.
In particular I want to toggle the AOD on and off when the display is off by waving over the proximity sensor or double tap on the display.
And as an extra (nice to have but not absolutely necessary), it would be nice to turn AOD on when I grab my phone and I have notifications.
I've tried my best, but the AOD won't get to work when the display is off. So I hope here are some talented users who can do something like that (or even have it already done).
I appreciate every help from you guys.
If you're rooted I used tasker to do exactly this. I could export an apk file for you.
I have a few versions:
- wave hand over proximity and AOD turns on for 10 seconds, then back off
- AOD turns off when proximity covered (so it's not on in your pocket) and turns back on when proximity uncovered.
- wave hand over proximity and wake to lockscreen
- wave hand over proximity to unlock (requires longpress home to unlock option enabled)
Edit: Wow...i just realized this IS the tasker forum, sorry!
Run Shell [settings put system aod_mode 0] use root: on
That will turn AOD off, if it's currently displayed
To turn it on, you set to 1 but its a little more tricky... you have to toggle the screen on/off after setting aod_mode to 1....but that will make your screen flash on for a split second (which you dont want)....so.... create a full screen, black scene...show the scene before toggling screen on and destroy it after toggling screen off..... you'll never know...
Code:
Profile: Proximity AOD Off (595)
State: Proximity Sensor
State: Display State [ Is:eek:ff ]
Enter: AOD Off (621)
A1: Run Shell [ Command:settings put system aod_mode 0 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
Exit: AOD On (622)
A1: Run Shell [ Command:settings put system aod_mode 1 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
A2: If [ %SCREEN ~ off ]
A3: Show Scene [ Name:Blocking Display As:Activity, Full Display, No Bar Horizontal Position:100 Vertical Position:100 Animation:System Show Exit Button:eek:ff Show Over Keyguard:eek:n Continue Task Immediately:eek:n ]
A4: Run Shell [ Command:input keyevent 1015
input keyevent 6 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
A5: Destroy Scene [ Name:Blocking ]
A6: End If
Sent from my SM-G955F using Tapatalk
RuggedHunter said:
- wave hand over proximity and AOD turns on for 10 seconds, then back off
- AOD turns off when proximity covered (so it's not on in your pocket) and turns back on when proximity uncovered.
Click to expand...
Click to collapse
Wow, that seems to be pretty complicated. Could you upload the xml file for the quotes things above for me? That would be great
ichbinich said:
Wow, that seems to be pretty complicated. Could you upload the xml file for the quotes things above for me? That would be great
Click to expand...
Click to collapse
Its really not all that complicated. Here ya go:
Air AOD
Proximity AOD Off
Blocking Scene
?
Of course, you don't want to use both of these at the same time.... they're sorta opposites. If you keep AOD Off normally and want it took appear for 10 seconds when you wave your hand, use AOD. If you keep AOD On normally and want it to turn off when in your pocket, etc...Then back on when out of pocket...use Proximity AOD Off.
Sent from my SM-G955F using Tapatalk
RuggedHunter said:
Its really not all that complicated. Here ya go
Click to expand...
Click to collapse
Thank you very much for sharing, I really appreciate that. But for some reason I cannot import those because they are invisible when I want to select them for importing. Any suggestions on that?
Make sure you've put the files in the proper folders.
/sdcard/Tasker/Profiles
/sdcard/Tasker/Scenes
Sent from my SM-G955F using Tapatalk
Thanks! It's working pretty well but is it the same with your device?
- After waving over the proximity sensor it takes about 5 seconds or so for AOD to show up
- Before AOD shows up, the light of softkeys as well as a SuperSU message are showing up for a short time
It takes a second or two, yes. If you're seeing soft keys and/or toasts, then the blocking scene probably needs to be tweaked for display size. Play around with it, you'll get it.
Sent from my SM-G955F using Tapatalk
RuggedHunter said:
It takes a second or two, yes. If you're seeing soft keys and/or toasts, then the blocking scene probably needs to be tweaked for display size. Play around with it, you'll get it.
Sent from my SM-G955F using Tapatalk
Click to expand...
Click to collapse
I set the scene up with my size (1080x1920) but I still get this:
1) less than 1 second the lockscreen (or homescreen, cannot say properly, it goes that fast)
2) SuperSU toast + softkey lights
3) black screen
4) than finally the AOD
that is awkward that it doesn't work properly on my device. Do you have any further ideas what I can check in order to get it working?
ichbinich said:
I set the scene up with my size (1080x1920) but I still get this:
1) less than 1 second the lockscreen (or homescreen, cannot say properly, it goes that fast)
2) SuperSU toast + softkey lights
3) black screen
4) than finally the AOD
that is awkward that it doesn't work properly on my device. Do you have any further ideas what I can check in order to get it working?
Click to expand...
Click to collapse
Hmmm.... I'm really not sure. Which profile are you using...Air AOD or Proximity AOD?
Are you saying that the display turns on and you see the whole lockscreen.... then it goes black except for the nav buttons and toast?
Sent from my SM-G955F using Tapatalk
RuggedHunter said:
Hmmm.... I'm really not sure. Which profile are you using...Air AOD or Proximity AOD?
Are you saying that the display turns on and you see the whole lockscreen.... then it goes black except for the nav buttons and toast?
Sent from my SM-G955F using Tapatalk
Click to expand...
Click to collapse
I'm using the Air AOD. Please look at the attached video (the softkey lights starting at the moment when the lockscreen is on).
ichbinich said:
I'm using the Air AOD. Please look at the attached video (the softkey lights starting at the moment when the lockscreen is on).
Click to expand...
Click to collapse
I see...The purpose of the blocking screen is to prevent that from happening. I think if you turn that Wait action on in A4 it might work for you.
However I see that the profile I linked is an old version that I must have uploaded a while ago...it doesn't match the description that I posted above. It shouldn't be the reason you're having problems, but I recommend deleting that profile from Tasker and from /sdcard/Tasker/ then import this one. Sorry about that.
https://www.dropbox.com/s/3zpgje43mhijxh6/Air_AOD.prf.xml?dl=0
I anticipate you'll have the exact same issue. If so, if you insert a Wait Acton between A2 and A3 for 1 sec or so, I think it'll work.
Sent from my SM-G955F using Tapatalk
Unfortunately that didn't change anything.
ichbinich said:
Unfortunately that didn't change anything.
Click to expand...
Click to collapse
Huh, I'm out of ideas unfortunately. Sorry it's not working for ya. It works well on my s8+
Sent from my SM-G955F using Tapatalk
Hello, @RuggedHunter
I'm sorry for bumping a 6+ months old topic but I think you can help me out with my problem. Here goes:
AOD is set to be 'Always' on from its settings.
I am using the second option from this tutorial: https://www.xda-developers.com/automatically-toggle-samsungs-always-on-display-when-charging-app which toggles the AOD option to on when the device is lying on a table for example with the screen facing upwards and toggles it off if this condition is not met. Now this works perfectly, but my problem is as follows.
If the screen is turned off, the new AOD setting won't take effect unless I turn the screen back on and turn it off again. So, for example, if my phone's in my hand and AOD is off with the screen off, when I leave it on the table facing up AOD won't show up, despite the proper condition being met. Now I tried the SecureSettings plugin way to wake up my screen for 1 sec but that didn't work at all for some reason. Could you help me out with this thing, please? I saw that you've made some black overlay and turn on the screen then apply this blocking overlay until it turns back off, but I'm no expert with Tasker so it was a bit confusing. Would you explain to me what to do in Tasker (step-by-step if possible, I know the basics things like how to make profile, task, etc btw) in order to make that AOD switch profile work perfect (aka to set aod_mode, turn on screen, show black blocking overlay while it's on, turn, screen back off, destroy overlay when screen turns off)?
Sorry for such a long post, I'm using a ported S8 ROM on my Galaxy S5 called Nemesis Reborn V4 but the "aod_mode" stuff works so anything S8 should.
@koragg97 yeah I had the same problem and worked around it like this... Here's my AOD ON task. The blocking scene is just a full display overlay blocking that is all black #FFFFFF and the keyevents toggle the dismay on/off quickly... they can both be 6 if you want.
AOD On (622)
A1: Run Shell [ Command:settings put system aod_mode 1 Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
A2: If [ %SCREEN ~ off ]
A3: Show Scene [ Name:Blocking Display As:Activity, No Bar, No Status Horizontal Position:100 Vertical Position:100 Animation:System Show Exit Buttonff Show Over Keyguardn Continue Task Immediatelyn ]
A4: Run Shell [ Command:input keyevent 1015
input keyevent 6 Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
A5: Destroy Scene [ Name:Blocking ]
A6: End If
Sent from my SM-G955F using Tapatalk
RuggedHunter said:
@koragg97 yeah I had the same problem and worked around it like this... Here's my AOD ON task. The blocking scene is just a full display overlay blocking that is all black #FFFFFF and the keyevents toggle the dismay on/off quickly... they can both be 6 if you want.
AOD On (622)
A1: Run Shell [ Command:settings put system aod_mode 1 Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
A2: If [ %SCREEN ~ off ]
A3: Show Scene [ Name:Blocking Display As:Activity, No Bar, No Status Horizontal Position:100 Vertical Position:100 Animation:System Show Exit Buttonff Show Over Keyguardn Continue Task Immediatelyn ]
A4: Run Shell [ Command:input keyevent 1015
input keyevent 6 Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
A5: Destroy Scene [ Name:Blocking ]
A6: End If
Sent from my SM-G955F using Tapatalk
Click to expand...
Click to collapse
Had to change the keyevent apparently but it works nicely. I also made a check so that it works just when the phone is locked to prevent accidental screen turn off if I cover the proximity sensor when I'm just using the phone. Also added an InCall safeguard since phone is technically locked during a call and the power button simulation ends the call lol

tasker auto switch from 3g to 4g when...

good morning. can anyone help me to set my galaxy s9 phone to switch from 4g to 3g when i arrive home or when i connect to a wifi network personal? i hope an answer. thanks
Yes you can automatically switch from 4g to 3g and vice versa via Tasker autoinput action.
I set my phone to go to '3g only' when connected to WiFi, and go back to '4g/3g auto connect' when WiFi is disconnected.
You can do this without rooting your phone.
GrippingSphere said:
Yes you can automatically switch from 4g to 3g and vice versa via Tasker autoinput action.
I set my phone to go to '3g only' when connected to WiFi, and go back to '4g/3g auto connect' when WiFi is disconnected.
You can do this without rooting your phone.
Click to expand...
Click to collapse
I need help. Can you tell me how to do this? I have galaxy s9 phone and downloaded autoinput app..... I hope in you. Thanks
I'm using the Plugin 'Toggle Network Txpe 5.0'
Profile: WiFi connected (31)
State: Wifi Connected [ SSID:* MAC:* IP:* Active:Yes ]
Enter: 4G/2G (15)
A1: Toggle Network Type 5.0 [ Configuration:set to GSM only (SIM ID: 1) Timeout (Seconds):0 ]
ratelutz said:
I'm using the Plugin 'Toggle Network Txpe 5.0'
Profile: WiFi connected (31)
State: Wifi Connected [ SSID:* MAC:* IP:* Active:Yes ]
Enter: 4G/2G (15)
A1: Toggle Network Type 5.0 [ Configuration:set to GSM only (SIM ID: 1) Timeout (Seconds):0 ]
Click to expand...
Click to collapse
now i try, but when i disconnect from wifi how return to 4g? thanks
myabc said:
now i try, but when i disconnect from wifi how return to 4g? thanks
Click to expand...
Click to collapse
Add a exit task
myabc said:
I need help. Can you tell me how to do this? I have galaxy s9 phone and downloaded autoinput app..... I hope in you. Thanks
Click to expand...
Click to collapse
If you are rooted, you can use the plugin Toggle Network Type. Otherwise, use autoinput.
I can only give you the steps I did in Tasker but you have to create yourself the Profiles and Tasks in Tasker. It's better that way, so you can master how to do it.
I basically did these steps:
I created a Profile 'WiFi Connected' to my home WiFi or any WiFi.
Then I created a task to activate when WiFi was successfully connected :
1. Open app 3g-4g switcher
2. Autoinput action to select '3g only'
3. Autoinput action to turn off 'Mobile data'
Then I created an 'Exit Task' to activate when WiFi is disconnected :
1. Open app 3g-4g switcher
2. Autoinput action to select '4g/3g (auto connect)'
3. Autoinput action to turn on 'Mobile data'
They are working well on my S9.
These are only guides when you create the Profile and Tasks in Tasker app.
ratelutz said:
Add a exit task
Click to expand...
Click to collapse
please help me. in tasker i am not able to set command for toggle in 3g and the second toggle for exit. i pray you to help me step by step. thanks
GrippingSphere said:
If you are rooted, you can use the plugin Toggle Network Type. Otherwise, use autoinput.
I can only give you the steps I did in Tasker but you have to create yourself the Profiles and Tasks in Tasker. It's better that way, so you can master how to do it.
I basically did these steps:
I created a Profile 'WiFi Connected' to my home WiFi or any WiFi.
Then I created a task to activate when WiFi was successfully connected :
1. Open app 3g-4g switcher
2. Autoinput action to select '3g only'
3. Autoinput action to turn off 'Mobile data'
Then I created an 'Exit Task' to activate when WiFi is disconnected :
1. Open app 3g-4g switcher
2. Autoinput action to select '4g/3g (auto connect)'
3. Autoinput action to turn on 'Mobile data'
They are working well on my S9.
These are only guides when you create the Profile and Tasks in Tasker app.
Click to expand...
Click to collapse
thank..... please i don't understand if i have to install both apps autoinput and 3g-4g switcher (where i can find this eventually?)
i can't be able to create a autoinput action because if i go to home, then open settings, connections, etc, it memorizes only go to home....
i hope in your help? thanks
myabc said:
thank..... please i don't understand if i have to install both apps autoinput and 3g-4g switcher (where i can find this eventually?)
i can't be able to create a autoinput action because if i go to home, then open settings, connections, etc, it memorizes only go to home....
i hope in your help? thanks
Click to expand...
Click to collapse
Yes, Tasker and autoinput takes time to master. You have to watch examples of Tasker and autoinput in YouTube to practice.
please i did half steps... i create a task with tasker that toggle in 3g when connected. used only this app: 'Toggle Network Txpe 5.0
now i am not able to create a task for return to 4g when disconnected from wifi. i am not able to create a working exit command. can help me please? thanks
myabc said:
please i did half steps... i create a task with tasker that toggle in 3g when connected. used only this app: 'Toggle Network Txpe 5.0
now i am not able to create a task for return to 4g when disconnected from wifi. i am not able to create a working exit command. can help me please? thanks
Click to expand...
Click to collapse
Just long tab on your profile an select add exit task
ratelutz said:
Just long tab on your profile an select add exit task
Click to expand...
Click to collapse
thanks, i did now but when i am disconnected from wifi, it stays in 3g mode and don't return LTE... where is the error? thanks again
myabc said:
thanks, i did now but when i am disconnected from wifi, it stays in 3g mode and don't return LTE... where is the error? thanks again
Click to expand...
Click to collapse
You have to select 4g in Toggle Network Type
2G/4G (16)
A1: Toggle Network Type 5.0 [ Configuration:set to LTE, CDMA, EvDo, GSM/WCDMA (SIM ID: 1) Timeout (Seconds):0 ]
ratelutz said:
You have to select 4g in Toggle Network Type
2G/4G (16)
A1: Toggle Network Type 5.0 [ Configuration:set to LTE, CDMA, EvDo, GSM/WCDMA (SIM ID: 1) Timeout (Seconds):0 ]
Click to expand...
Click to collapse
in s9 phone rooted i have not 4g mode in that app, only 3g and 2g..... have i to set manually in tasker for 4g? from where menu? please suggest... thanks
myabc said:
in s9 phone rooted i have not g mode in that app, only 3g and 2g..... have i to set manually in tasker for 4g? from where menu? please suggest... thanks
Click to expand...
Click to collapse
If it is not supported on your device i think you are lost.
Sorry i can't help more. Im a user not dev
ratelutz said:
If it is not supported on your device i think you are lost.
Sorry i can't help more. Im a user not dev
Click to expand...
Click to collapse
thanks
myabc said:
thanks
Click to expand...
Click to collapse
https://taskernet.com/shares/?user=...7avU23A7Zk1WX2kwtg==&id=Task:Z5+234G+Only+Xda
Use your mobile email click above link & save this " TASK " in SD external card.
In Tasker , go to task & long click the " COLUMN , TASK , IMPORT " look up your external card to the above task.
Once the task in your tasker , long click & hit play button at button in tasker.
See if this change your network mode by checking setting SIM , Preferred Network.
Hope this help.
*** This require no other plugins as you can see from the task action.
edmond.

Categories

Resources