Code example for FileInputStream

Methods: getFD

0
            new Thread(){
                public void run(){ 
                    try{ 
                        if(!mp.isPlaying()){
                            mp.reset();
                            mp.setDataSource(fis.getFD());
                            mp.prepare();
                            mp.start();
                        } 
                        else{ 
                            stop();
                        } 
                    } 
 
                    catch(Exception e){
                        Log.e(TAG, "Error loading audio. Maybe it is race condition", e);
                    } 
                     
                } 
            }.start();
        }