adrianolol Posted April 12, 2022 Share Posted April 12, 2022 I've been trying to find a way to get the currently playing song at any time I do have a broadcast receiver working which alerts me any time the song metadata or status changes but i'd like to be able to get the information any time. I tried checking out the provided API from github but no luck so far, anyone can point me to the correct direction? thanks! Quote Translate Revert translation? Arabic Belarusian Bengali Chinese (Simplified) Chinese (Traditional) Czech Danish Dutch English French German Greek Hebrew Hindi Hungarian Indonesian Italian Japanese Korean Persian Polish Portuguese Romanian Russian Serbian Slovak Spanish Thai Turkish Ukrainian Vietnamese Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 12, 2022 Share Posted April 12, 2022 @adrianolol can you post what you have so far? Quote Translate Revert translation? Arabic Belarusian Bengali Chinese (Simplified) Chinese (Traditional) Czech Danish Dutch English French German Greek Hebrew Hindi Hungarian Indonesian Italian Japanese Korean Persian Polish Portuguese Romanian Russian Serbian Slovak Spanish Thai Turkish Ukrainian Vietnamese Link to comment Share on other sites More sharing options...
sik0vny Posted December 24, 2022 Share Posted December 24, 2022 Wow the most crucial API functionality I can image, and nobody cares, nobody answers? I'm also looking for the answer. So far I found there was a way to get the data from STATUS_CHANGED event, but it looks its not there anymore. The only way is to get if from TRACK_CHANGED, but I don't want to change track, I want to get info for currently playing track. And besides that track changing is not reliable, its not reacting on automatic track change (at the end of the song). So again, developers, please respond: is there any way to get currently playing song? Quote Translate Revert translation? Arabic Belarusian Bengali Chinese (Simplified) Chinese (Traditional) Czech Danish Dutch English French German Greek Hebrew Hindi Hungarian Indonesian Italian Japanese Korean Persian Polish Portuguese Romanian Russian Serbian Slovak Spanish Thai Turkish Ukrainian Vietnamese Link to comment Share on other sites More sharing options...
maxmp Posted December 24, 2022 Share Posted December 24, 2022 You may check sample project for working code samples. The current track is retrieved here: https://github.com/maxmpz/powerampapi/blob/master/poweramp_api_example/src/main/java/com/maxmpz/poweramp/apiexample/MainActivity.java#L260 The intent returned when you register for the TRACK_CHANGED action contains the current track data. If you just want the data, pass null as receiver : https://developer.android.com/reference/android/content/Context#:~:text=if you know the intent your are registering for is sticky%2C you can supply null for your receiver. in this case%2C no receiver is registered -- the function simply returns the sticky intent that matches filter Merry Xmas! Quote Translate Revert translation? Arabic Belarusian Bengali Chinese (Simplified) Chinese (Traditional) Czech Danish Dutch English French German Greek Hebrew Hindi Hungarian Indonesian Italian Japanese Korean Persian Polish Portuguese Romanian Russian Serbian Slovak Spanish Thai Turkish Ukrainian Vietnamese Link to comment Share on other sites More sharing options...
sik0vny Posted December 24, 2022 Share Posted December 24, 2022 Thanks. But maybe my bad, I forgot to add a crucial information: I need to do that from Tasker. Any chances? Quote Translate Revert translation? Arabic Belarusian Bengali Chinese (Simplified) Chinese (Traditional) Czech Danish Dutch English French German Greek Hebrew Hindi Hungarian Indonesian Italian Japanese Korean Persian Polish Portuguese Romanian Russian Serbian Slovak Spanish Thai Turkish Ukrainian Vietnamese Link to comment Share on other sites More sharing options...
maxmp Posted December 25, 2022 Share Posted December 25, 2022 @sik0vny Tasker intent processing is focused on the receiving them (Intent Received profile). If you want to initiate intent retrieval for some action, widget, button, etc. that may require that java method calling, which Tasker can do but syntax is cumbersome: https://tasker.joaoapps.com/userguide/en/java.html If you think this may be a feature request (i.e. better integration with the Tasker for the current track and other info retrieval), feel free to post it. Thanks! Quote Translate Revert translation? Arabic Belarusian Bengali Chinese (Simplified) Chinese (Traditional) Czech Danish Dutch English French German Greek Hebrew Hindi Hungarian Indonesian Italian Japanese Korean Persian Polish Portuguese Romanian Russian Serbian Slovak Spanish Thai Turkish Ukrainian Vietnamese Link to comment Share on other sites More sharing options...
Rabangus Posted December 25, 2022 Share Posted December 25, 2022 I have done some stuff using Tasker, but more around trying to get the currently playing Playlist and track. I use STATUS_CHANGED, but it doesn't seem to suit your needs as you say. Could you just use the built-in Tasker variables %mt_artist and %mt_track? They get populated by most players - if what you're doing needs to be specific to Poweramp then you could add a check on %mt_app = com.maxmpz.audioplayer Hope this helps? Quote Translate Revert translation? Arabic Belarusian Bengali Chinese (Simplified) Chinese (Traditional) Czech Danish Dutch English French German Greek Hebrew Hindi Hungarian Indonesian Italian Japanese Korean Persian Polish Portuguese Romanian Russian Serbian Slovak Spanish Thai Turkish Ukrainian Vietnamese Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.