Code example for MediaPlayer.OnCompletionListener

Methods: onCompletion

0
                                    public void onClick(DialogInterface dialog, int whichButton) { 
                                        /* If we get here, there is no onError listener, so 
                                         * at least inform them that the video is over. 
                                         */ 
                                        if (mOnCompletionListener != null) { 
                                            mOnCompletionListener.onCompletion(mMediaPlayer); 
                                        } 
                                    } 
                                }) 
                        .setCancelable(false) 
                        .show(); 
            } 
            return true; 
        } 
    }; 
 
    private MediaPlayer.OnBufferingUpdateListener mBufferingUpdateListener =
        new MediaPlayer.OnBufferingUpdateListener() { 
        public void onBufferingUpdate(MediaPlayer mp, int percent) { 
            mCurrentBufferPercentage = percent; 
        }