- A compatible music player. Go to this page and search for %MTRACK to see more details.
- Create a new profile and name it "Say Track."
- Create an Event context, go to Variables --> Variable Set. Set the variable to %MTRACK and leave the value blank.
- Create the task but don't name it anything.
- Task --> Wait. Wait 1 second. This is necessary because %MARTIST sometimes takes a bit more time to be set after %MTRACK is.
- Variables --> Variable Split. Name %MARTIST, Splitter is - (a dash).
- Alert --> Say. Text: %MTRACK by %MARTIST1. Check If and set it to if %MPLAYSTATE !~ PAUSED AND %SCREEN ~ off. This is so it'll only read the track name and artist if the music isn't paused and if the screen is off.
- Alert --> Flash. Text: %MTRACK by %MARTIST1. Check If and set it to if %MPLAYSTATE !~ PAUSED AND %SCREEN ~ on. This will flash the track name and artist if the screen is on and music is playing (obviously).
That's it! Let me know if you find this one useful. Also, post below if it works for your music player. I use Gonemad Music Player and it works great for me!
I've attached the XML file below. To import it, move it to /sdcard/Tasker/Profiles, then open Tasker and long-press on the Profiles tab up top and click on Import.