媒体播放器stop()方法无法在三星手机中使用

时间:2015-10-16 06:46:48

标签: android android-mediaplayer

我在我的声音应用程序中实现了媒体播放器的功能。

它可以在所有设备上工作,而不是三星手机。当我点击停止按钮时,播放器不断播放声音。这是我的停止按钮代码。

if (mState.equals(State.Playing)) {
                    mMediaPlayer.stop();
                    mState = State.Paused;
                    if (mState == State.Playing)
                        mContentView
                                .setImageViewResource(R.id.playPauseButton,
                                        R.drawable.pause_icon);
                    else
                        mContentView.setImageViewResource(
                                R.id.playPauseButton, R.drawable.play_icon);
                    mBuilder.setContent(mContentView);

                    mNotification = mBuilder.build();
                    mNotificationManager.notify(NOTIFICATION_ID,
                            mNotification);}

0 个答案:

没有答案