views:

583

answers:

2

All, I'm coding an app that works with the current status of the Android Media Player, basically, I'm trying to find a way to obtain, for example, the current track information or the track next on the library/playlist. Thing is, I couldn't find any way to "connect" to the app, I read about some services and copying an Android MP file to my project and so on, but I just wanted to check if there's another way such as a content provider.

Thanks a lot for your attention.

Let me know if you have any questions, hope I was clear enough.

+1  A: 

The Music application is not part of the SDK, so there is no reliable and supported way to interact with it.

CommonsWare
A: 

As commonsware mentioned, there is no official method for accessing the Music Player status. There is an unofficial method though..

WARNING: This is an unofficial method and will probably break in the future. So, don't use it for any production applications. The unofficial method of accessing IMediaPlaybackService is described in this blog post by Alex Curelea and there is sample code in the scrobbledroid Google Code Project.

Roman Nurik