-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to have a good storage structure for multiple playlists? #70
Comments
You should continue using a static (singleton) implementation for the PlaylistManager. When switching a playlist you will need to
|
As I mentioned I tried to use static implementation:
Expected: open AudioPlayerActivity and play song A" list 2 Actual: open AudioPlayerActivity and play song A list 1 I tried to track down the value static playlistManager in the App.java, it changed when A" from list 2 clicked but the problem is that when A' from list 1 clicked and play the service started already and when A" from list 2 clicked the player not started again since it will fire the onResume() callback of the AudioPlayerActivity.java. Let me know if you need clarification... |
What is your implementation of |
Here it is |
OK, currently the pendingIntent is only updated when the service is set as a Foreground service. I'll update it shortly to correctly update when the notification is updated. |
Great thank, |
Yep. I usually have a different setup so I haven't hit this issue before. I should be releasing 2.5.2 in a few minutes |
2.5.2 has been released |
Confirm fixed.. Thank |
Hi,
I notice there is a static variable PlayListManager that will be used in the AudioPlayerActivity.java
Each time this method invoked in the AudioPlayerActivity
playlistManagerAudioActivity.play(selectedIndex, false);
The AudioService.class will be started.
I followed the demo and it works fine for one playlist.
However, if I have multiple playlist then should I :
One issue that I met using static variable in App.java which is the playListManager for all playlists was that when I play a song from list 1, then switch back select another song from list 2 when I click on the foreground notification it will play a song that I chose from list 1 and not the latest one.
What do you think?
Thank
The text was updated successfully, but these errors were encountered: