[Q] PowerAmp Getting Next Track

Search This thread

vkapadia

Member
Jun 27, 2008
35
6
Renton, WA
I'm trying to write an app to help with PowerAmp. I'd like this app to get the currently playing track and the next track (which PowerAmp displays on the bottom of the screen when in the currently playing song view). I can get the current track, but I don't know how to get the next track. Is this even possible?

Here's what I have so far to get the currently playing track:

In the activity's onCreate:
Code:
IntentFilter iF = new IntentFilter();
iF.addAction("com.maxmpz.audioplayer.TRACK_CHANGED");
registerReceiver(mReceiver, iF);

In the mReceiver's onReceive:
Code:
Bundle track = intent.getBundleExtra("track");
string artist = track.getString("artist");
string title = track.getString("title");

I thought about using track.getString("posInList") to get the current position and then incrementing it to get the next track, but then I don't know how to get the playing playlist to check the next track's artist/title.