Play audio file from android application.

Right now i am able to play audio file stored as a resource. ( In
application "res/raw/a.wav" folder )

But i would like to play audio file stored in "/data/data/com.myapp/
files/a.wav" (i.e audio file stored in "files" directory at runtime)

   I try this and it did not work:
    ....
    try {

      MediaPlayer mp = new MediaPlayer();
      mp.setDataSource("/data/data/com.WrkSpace.corsoft.ICEcare/files/
mk.wav");
      mp.prepare();
      mp.start();
      ....
    }
    ....

Any pointer or help on this would be greatly appreciated.

Thank You.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to