play current track when launching audio player - Tasker Tips & Tricks

I've managed to make a profile that switches MortPlayer on when I connect my Bluetooth headphones but I can't get it to start playing the current track. Tried to do it using send intent copied from a Spotify profile I found but I only get an error message.
The action I use is this: MortPlayer.ui.widget.PLAY but it doesn't work. Can't remember the full Spotify line I based that on.
Edit realised that using media-media control-play (simultaneously)-app did the trick!

The profile works but only if I have unlocked the phone. It launches but Doesn't play.

This is a wild stab at the problem... Try adding a pop-up action (alert -> pop-up) with just a brief timeout to wake the screen before the play action.
It might also be due to the restrictions Android had built in as to what app may do with the screen locked.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

Thanks I'll try that.

ktmom said:
This is a wild stab at the problem... Try adding a pop-up action (alert -> pop-up) with just a brief timeout to wake the screen before the play action.
It might also be due to the restrictions Android had built in as to what app may do with the screen locked.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
Tried this with a 5 second delay but no luck. The profile activates fine but can't execute the final step. Don't see the alert pop up either in the screen.

It might be easier to help if we could see the problem task description.

Launch (16)
A1: Launch App [ App:MortPlayer Audio Books Data: Exclude From Recent Apps: off Always Start New Copy: off ]
A2: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A3: Popup [ Title: Textlay Background Image: Layoutopup Timeout (Seconds):5 Show Over Keyguard: on ]
A4: Media Control [ Cmdlay [Simulated Only] Simulate Media Button: on App:MortPlayer Audio Books Use Notification If Available: off ]

The sequence works fine when the screen is on and unlocked It also works fine without the alert with the screen on and unkocked

Ok, I don't know (remember) your device and OS version. But, maybe the AutoInput unlock screen action will help where just waking the screen with the pop-up action didn't. In android 7+, the screen can be unlocked only if there is a non-secure lock screen or the smart unlock is active.

It's a OnePlus 3t OS 9.0.5 not rooted.

If the previous idea doesn't help you, then you may have to search out a OnePlus solution. Oxygen OS does it's own thing and I'm not particularly familiar with it's peculiarities.

Tried the smart unlock but it didn't solve the issue. Might try to add a delay whilst the phone unlocks to see if that helps

Related

Shortcut Brightness on Nova Launcher

Is there anybody who knows how I can add an Shortcut of Gear Settings -> Display -> Brightness on Nova Launcher Desktop?
If I try to set an Shortcut of Settings. I only can use Display. But this is the setting of the Device and it will crash everytime.
Hope you can help me.
Thx forward
Filler1971 said:
Is there anybody who knows how I can add an Shortcut of Gear Settings -> Display -> Brightness on Nova Launcher Desktop?
If I try to set an Shortcut of Settings. I only can use Display. But this is the setting of the Device and it will crash everytime.
Hope you can help me.
Thx forward
Click to expand...
Click to collapse
Creat a widget: Shortcuts >> Activities >> Settings (the stock one not nova) >>displayDisplaySettingsList
I know this isn't what you asked about.... but I'm using Tasker to set the automatically set the screen brightness based on time of day.
i.e.auto set brightness set to "4" (tasker display brightness value of 142) at 8AM for daytime use, and brightness set to "2" (tasker display brightness value of 54) at 5PM for nighttime.
Probably could make some homescreen buttons to toggle/change brightness levels too...
I reinstalled gravity box to get full options and use brightness slider.
Sent from my Nexus 5 using XDA Premium 4 mobile app
Thx for reply :good:
@almulder1092
That's the way I've done it.
Maybe I should take a deeper look for Tasker. I've often read about it.
Filler1971 said:
Thx for reply :good:
@almulder1092
That's the way I've done it.
Maybe I should take a deeper look for Tasker. I've often read about it.
Click to expand...
Click to collapse
I use the tasker way. It 9:00pm my watch goes it to low brightness and silent mode until 8:00am then it returns to normal brightness and sound mode.
any chance you can export out the profile and upload it i would to use it if you don't mind with different hours
cyberone3 said:
any chance you can export out the profile and upload it i would to use it if you don't mind with different hours
Click to expand...
Click to collapse
I would but I have since wiped it out and reverted back to stock. This weekend I plan on redoing my gear. (Was testing some stuff out). Once I do I will upload them.
almulder1092 said:
I would but I have since wiped it out and reverted back to stock. This weekend I plan on redoing my gear. (Was testing some stuff out). Once I do I will upload them.
Click to expand...
Click to collapse
thats a person form the twrp thread was able to get me up and working again
but if you code that woudl be great when you have the time
i know this wont be the last time this will be asked
By the time you've downloaded it to your phone, sent it via Bluetooth to your watch and then imported it into tasker on your watch you could have written the profile 4 times over!
Here's the description of the task in rough that I've just made. You should really write your own tasks to make them specific to you.
Profile: Gear Light And Sound (497)
Time: From 21:00 Till 08:00
Enter: Gear Light Sound (500)
A1: Display Brightness [ Level:49 Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
A2: Ringer Volume [ Level:0 Displayff Soundff ]
Exit: Gear Light And Sound Start (503)
A1: Display Brightness [ Level:136 Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
A2: Ringer Volume [ Level:10 Displayff Soundff ]

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?

[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

Profile triggered by %time variable not firing

Phone is Pixel 3a running Android 10, Tasker is up-to-date.
I have a profile called PwrConnect that runs a task called Clock. The task simply launches my alarm clock app on the phone. The profile is primarily triggered when any power is connected to the phone but it has a secondary condition that specifies the time must be between 10:30pm and 6:00am.
When I plug my charger into the phone the profile is not triggered. If I remove the secondary condition (the time constraint) then the profile triggers when I plug in. But here's where it gets kind of strange. If I include the secondary condition (the time constraint) and I have the Tasker app open when I plug the charger in then the profile fires and runs the task which launches the clock app. Alternatively, I have also tried putting the time constraint in the task (%time > 2230) but that does not work either.
What am I doing wrong??? Or, is this a bug? Anyone else see anything like this?
Do you have "reliable alarms" enabled?
Have you tried a simple profile to just test the time context?
ktmom said:
Do you have "reliable alarms" enabled?
Have you tried a simple profile to just test the time context?
Click to expand...
Click to collapse
I'm not sure what "reliable alarms" is. Is that a setting in Tasker or Android?
Anyway, I have done some more testing. I added another step to the Clock task to simply flash a message when the task runs and I have found that the task (and therefore the profile) is indeed being executed as it should be - that is: when power is connected and the time is between 10:30pm and 6:00am. I can tell this because the message flashes on the screen when I connect power. BUT... the clock app only launches if I have the Tasker app open when I connect power. If the Tasker app is not open then I see the message flash but the clock app does not launch.
Reliable alarms is a tasker setting in preferences on the monitor tab. It helps tasker accurately execute time related activities.
What device and ROM are you on?
The following profile works fine for me with Tasker not in the foreground:
Code:
Time: From 11:44AM Till 3:44PM
State: Power [
Source:Any
]
Enter: Open App
A1: Launch App [
App:Clock
Data:
Exclude From Recent Apps: Off
Always Start New Copy: Off
]
ktmom said:
Reliable alarms is a tasker setting in preferences on the monitor tab. It helps tasker accurately execute time related activities.
What device and ROM are you on?
Click to expand...
Click to collapse
Device: Pixel 3a, ROM: stock Android 10 (not rooted)
I am fairly certain that the problem lies with the clock app that I am using. When I change the task so that it launches the stock, built-in clock app then everything works as it should. The clock app that I am trying to use (Kaloer Clock) is no longer in the PlayStore so has not been updated in a while. So, I suspect that there is something about it that Android 10 does not like. The app still functions fine and I can manually start it or Tasker will start it IF Tasker is running in the foreground. In fact this app has a setting that should start it automatically when power is plugged in but that stopped working about the time that I upgraded to Android 10, which is why I was trying to automate it with Tasker. I hate to give up on this app though because it is the only clock app I have found that allows me to tap anywhere on the screen to snooze the alarm (or long-press to cancel it). Everything else I have tried makes you tap an on-screen button which is difficult without my glasses.
Using AutoNotification (or any tasker notification listener plugin), a scene and intents, you can make the Google Clock have a full screen snooze/dismiss "button".
I slapped together an example that I put on Taskernet. It's full screen, a tap snoozes and long press dismisses.
To run it as is, you will need AutoNotification installed. The "ktm" after the profile/task/scene names can be removed. I do this to help prevent name collisions with anything already existing during import.
ktmom said:
Using AutoNotification (or any tasker notification listener plugin), a scene and intents, you can make the Google Clock have a full screen snooze/dismiss "button".
I slapped together an example that I put on Taskernet. It's full screen, a tap snoozes and long press dismisses.
To run it as is, you will need AutoNotification installed. The "ktm" after the profile/task/scene names can be removed. I do this to help prevent name collisions with anything already existing during import.
Click to expand...
Click to collapse
Ktmom,
I installed AutoNotification and imported your project. I am assuming that I need to delete either step 2 or 3 in the Stop Alarm ktm task. But, the scene does not appear unless I have Tasker running in the foreground when the alarm fires. Just wondered if you have test this in Android 10? Seems as though all my problems started after I upgraded.
dremelts said:
Ktmom,
I installed AutoNotification and imported your project. I am assuming that I need to delete either step 2 or 3 in the Stop Alarm ktm task. But, the scene does not appear unless I have Tasker running in the foreground when the alarm fires. Just wondered if you have test this in Android 10? Seems as though all my problems started after I upgraded.
Click to expand...
Click to collapse
The action that you're not using can be deleted or left paused.
And no, sorry, I'm always slow to update to major releases. But, there's something to try.
Edit the scene that your using, without changing anything else, tap the 3-dot menu. Select "properties" and change the "property type" to "activity". Save out of the scene.
Now edit the task -> show scene action that you are using and change "display as" to "activity".
Save out of the task, and Tasker, then test again.

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