What do you mean when you say the audio file is stored in a SQLite database? Does playing the same file from the sd card work?
On Wed, Jul 15, 2009 at 12:05 PM, Rick<[email protected]> wrote: > > What I am trying to accomplish here is to get an audio file that I > have stored in an SQLite database on the phone, and play it upon > clicking a button. audioPath is the path to the file. The problem is > that MediaPlayer.create() is always null, even though I believe I am > giving it a correct Uri. Can anyone shed some light on this? Code > snippet below: > > Uri uri = Uri.parse(audioPath); > Log.i(TAG,"AUDIO: " + uri.toString()); > MediaPlayer mp = MediaPlayer.create(this, uri); > if (mp != null){ > mp.start(); > ... > > "AUDIO: /data/data/project.android/files/musicfile.mp3" > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

