How to manage a player?
===

How do I properly handle a player to ring two small mp3 files sequentially?

I tried to handle this with two methods, getDuration() and wait() but it does not work.
I hope for your help

    if (mediaplayer!=null){ 
    mediaplayer.reset();
    mediaplayer.release();
    }
    mediaplayer = MediaPlayer.create(livello2.this, R.raw.do1);
    mediaplayer.start();
    t = mediaplayer.getDuration();
    }


    if (mediaplayer!=null){ 
    mediaplayer.reset();
    mediaplayer.release();
    }
    mediaplayer = MediaPlayer.create(livello2.this, R.raw.do_1);
    try {

    mediaplayer.wait(t);
    } catch (InterruptedException e) {										       

    e.printStackTrace();
    }
    mediaplayer.start();
                         			
    }