Get error exception when using the sleep function
<p>I want to delay my application for a while while a melody is playing, and when it's finished change the image on an imageview.</p>

<pre><code>public void addListenerOnButtons() {    
    harmonicaTecknad= (ImageView)this.findViewById(R.id.harmonicatecknadspelautblas);
    harmonicaTecknad.setOnClickListener(new OnClickListener() {

    @Override
    public void onClick(View arg0) {            
        harmonicaTecknad.setImageResource(R.drawable.harmonicatecknadtryckrood);
        RunAnimations();
        utblas=MediaPlayer.create(SpelaTonerActivity.this, R.raw.utblas4);
        utblas.start();
        Thread timer = new Thread(){
            public void run() {
                try { // The delay should occur here
                    sleep(utblas.getDuration());
                } catch(InterruptedException e) {
                    e.printStackTrace();
                } finally {
                    harmonicaTecknad.setImageResource(R.drawable.harmonicatecknad1);
                }
            }
        };
        timer.start();
    }
}
</code></pre>

<p>I get an exception error, obviously I cannot set the image inside the thread, so where should I set it?</p>
