The files are stored in a JSON Database in http format, but to eliminate loading times since the application they will be used in will also include video and time is a factor, prior to launching a "game" I download the necessary files from the JSON Database to a SQLite database on the phone.
I am able to stream the file directly from its full http path using AsyncPlayer but there is a loading time I would like to avoid, and AsyncPlayer does not work with video. I have not tested whether or not the file would play from the sd card, but I am fairly certain that is not the issue since I am able to pull the file from the SQLite database and play it locally on my computer with no problems. Sorry if that was slightly confusing. I'm not the best at explaining things. On Jul 15, 3:16 pm, Marco Nelissen <[email protected]> wrote: > 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 -~----------~----~----~----~------~----~------~--~---

