开发者

Is there a way to tell if the Android MediaPlayer is currently playing a song?

开发者 https://www.devze.com 2023-01-23 16:13 出处:网络
I have looked into the MediaPlayer documentation for Android, but this seems to be primarily for playing media in a localized media player.I just want to be able to tell if music is playing in Android

I have looked into the MediaPlayer documentation for Android, but this seems to be primarily for playing media in a localized media player. I just want to be able to tell if music is playing in Android default Media P开发者_如何学Pythonlayer.

Thanks


AudioManager::isMusicActive() Checks whether any music is active.

http://developer.android.com/reference/android/media/AudioManager.html


See if that helps you: http://www.alexc.me/android-music-app-service-currently-playing-song/231/

0

精彩评论

暂无评论...
验证码 换一张
取 消