no need to add it in manifest
simply create an mediaplayer

this will be the command:
        int i=getResources().getIdentifier(s,"raw",getPackageName());
        if(i!=0){
                        MediaPlayer player = new
MediaPlayer().create(getBaseContext(),i);;
                        player.setVolume(0.9f, 0.9f);
                        player.start();
                        }

s=name of the file
raw is folder

On May 7, 7:58 pm, Meba <[email protected]> wrote:
> Hi,
> I want to use a MP3 file as resource and copy this to res/raw and I
> can access in activity by R.raw.MP3_FILENAME but when start this
> application can't find this resource.(I'm try define it as meta-data
> but I don't know how can I define this name)
> how can I add mp3 file name in manifest and access to this.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to