Is there any way to get the details of current song played by MediaPlayer?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Just for reference, this works:
I think you need to have your own model classes from wherein you can set and get your song title. For this and other information, see Stack Overflow question:
How to set the PlayList Index for Mediaplayer(ExpressionMediaPlayer:Mediaplayer).
If you are keen to know how it is being implemented, you can get the source and see how they have implemented.
I learned how to do it just now, so I don't know if it works on all versions of android yet.
There is no documented method for getting info on the currently playing file from a MediaPlayer instance, you'll need to make your app store that information itself in another way. If you're using a Service to keep track of your MediaPlayer instance (which I'd recommend) then this shouldn't be too hard.