how to write a simple audio player on android?
<p>I have written a simple audio player on android(below). And trying to run on virtual device(AVD). But I am not getting the sound. Is it not possible to get sound using AVD ?
Kindly help me..
Thanks</p>

<pre><code>package com.example.helloplayer;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;

public class HelloPlayer extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        MediaPlayer mp = new MediaPlayer();
        mp.setDataSource("/home/usr/audio/file.mp3");
        mp.prepare();
        mp.start();

    }
}
</code></pre>
