On Wed, Jul 15, 2009 at 1:37 PM, Rick<[email protected]> wrote: > > /data/data/etc. is the relative path to the file in the database. At > least I'm fairly certain that it is. So the idea is that it would play > it from its location in the database. This file at that path is fine > because using the DDMS Perspective within Eclipse I can navigate to > that path, pull the file locally, and play it no problem.
Play it using what? > The full log print out is as follows. > > 07-15 20:33:54.736: ERROR/PlayerDriver(554): Command > PLAYER_SET_DATA_SOURCE completed with an error or info > PVMFErrNotSupported That would seem to indicate that the file is not in a supported format. You can doublecheck this by copying it your sd card and using the music app to play it. If the music app does play it, then I suspect a permissions problem (i.e. the media service can't access the file) > 07-15 20:33:54.785: ERROR/MediaPlayer(31280): error (1, -4) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): create failed: > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): java.io.IOException: > Prepare failed.: status=0x1 > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.media.MediaPlayer.prepare(Native Method) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.media.MediaPlayer.create(MediaPlayer.java:520) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.media.MediaPlayer.create(MediaPlayer.java:497) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > scvngr.android.Mission.audioButtonHandler(Mission.java:188) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > scvngr.android.Mission$6.onClick(Mission.java:139) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.View.performClick(View.java:2179) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.View.onTouchEvent(View.java:3828) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.widget.TextView.onTouchEvent(TextView.java:6291) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.View.dispatchTouchEvent(View.java:3368) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > com.android.internal.policy.impl.PhoneWindow > $DecorView.superDispatchTouchEvent(PhoneWindow.java:1707) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent > (PhoneWindow.java:1197) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.app.Activity.dispatchTouchEvent(Activity.java:1993) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > com.android.internal.policy.impl.PhoneWindow > $DecorView.dispatchTouchEvent(PhoneWindow.java:1691) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.view.ViewRoot.handleMessage(ViewRoot.java:1525) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.os.Handler.dispatchMessage(Handler.java:99) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.os.Looper.loop(Looper.java:123) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > android.app.ActivityThread.main(ActivityThread.java:3948) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > java.lang.reflect.Method.invokeNative(Native Method) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > java.lang.reflect.Method.invoke(Method.java:521) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > (ZygoteInit.java:782) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) > 07-15 20:33:54.855: DEBUG/MediaPlayer(31280): at > dalvik.system.NativeStart.main(Native Method) > > > On Jul 15, 4:13 pm, Marco Nelissen <[email protected]> wrote: >> On Wed, Jul 15, 2009 at 12:26 PM, Rick<[email protected]> wrote: >> >> > 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. >> >> I'm still confused, since you again said that the files are in a >> SQLite database, but the code you posted wants to play >> /data/data/project.android/files/musicfile.mp3 which is clearly just a >> regular file path. So where does the database fit in to all this? Are >> you pulling the data from a sqlite blob, writing it to a file, then >> playing that file? >> If so, you might want to verify that the file itself is actually OK >> when you try to play it. >> Also, is there anything else in the log? When MediaPlayer.create() >> fails, something should be printed to the log that tells you why. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

