Poweramp is a popular media player.
I made a loop to check a few things:
- If Poweramp is running
- If a jack is plugged
- If the volumes are according
Almost everything work, except Tasker doesn't seem to detect if Poweramp is running (even though there are explicit toasts of it).
No plugins on the market work either
My idea to overcome this is to read the toasts and see if the title (or anything) matches the string "Poweramp".
How to do this inside a task (not a profile) ?
I read some suggestions to use the %NTITLE var, or something, but it's confusing. No results on my attempts.
I also read about an AutoNotification plugin, but it's even more confusing... (I have it installed, but out of the box tasker is prefferred)
Kindly change the example below with the solution, if there is:
This is a task, not a profile ! This is also a simplified version of my code Label: Check If (PlugConnected=1) //Global variable set elsewhere PerformTask: VolumesMedia If (%ntitle != Poweramp) Launch App: Poweramp Endif Wait 1 minute Goto: Label Check Else PerformTask: VolumesNormal Kill App: Poweramp Endif
Sometimes poweramp crashes, that's why I need a checkup loop. And other reasons.
Thank you ahead
Everything above is a simplification of my situation. Out of curiosity:
Sometimes I plug via P2 connector, and most of the times, via bluetooth.
For either source there are different audio settings. There's also a third 'default' audio setting (tasks) that is triggered by other profiles (states and triggers) not related to media.
My bluetooths (car and home stereo) generally trigger a task, but sometimes it goes crazy, forcing me to create tasks and profiles beyond triggers only to ensure it is alive and breathing (redundancies)
There's a Profile that detects if an app is running (so much simple), but it's not detecting Poweramp, hence, another redundancy structure (task) I'm forced to create
There's a profile to turn off radios to spare energy, and it's intrinsically connected to the media...
Basically, this complex (but optimized) structure I have right now is the one I developed (over maybe a year) to circunvent glitches.
I could simplify so much more, but Tasker is very limited as I cannot make a profile call two tasks (I need to make tasks only to call other tasks. That's even ridiculous).
If I could program tasker as I program C, my god... (And I know only the basics of C). Suggestions accepted.