Code example for MediaPlayer

Methods: isLoopingpreparereleaseresetsetDataSourcesetLooping

0
    } 
 
    public static boolean isLoopingAfterReset(String filePath) {
        MediaPlayer mp = null;
        try { 
            mp = new MediaPlayer();
            mp.setDataSource(filePath);
            mp.prepare();
 
            mp.setLooping(true);
            mp.reset();
            if (mp.isLooping()) {
                Log.v(TAG, "MediaPlayer.isLooping() returned true after reset()");
                return false; 
            } 
        }catch (Exception e){
            Log.v(TAG, "Exception : " + e.toString());
            return false; 
        } finally { 
            if (mp != null)
                mp.release();
        } 
 
        return true; 
    }