You should specify the full path to the file, not just its name.
On Tue, Jul 21, 2009 at 1:58 PM, MannyNS<[email protected]> wrote: > > Hi everyone, > > I plan to have a 3gp video file that will come with the installation > package, it will be placed in /files/ subdirectory, and I would like > to ask the native Android media player to play it when I want that. > > Here is what I have planned to do/code: > > Intent intent = new Intent(android.content.Intent.ACTION_VIEW); > > Uri data = Uri.parse("BattlestarGalactica.3gp"); > intent.setDataAndType(data,"video/3gpp"); > startActivity(intent); > > > > However, when I try to launch the lines above, I get the following > error: > > > 07-21 22:40:19.771: VERBOSE/VideoView(351): reset duration to -1 in > openVideo > 07-21 22:40:19.791: DEBUG/SurfaceFlinger(56): Screen about to return, > flinger = 0x1841d0 > 07-21 22:40:20.091: ERROR/PlayerDriver(35): Command > PLAYER_SET_DATA_SOURCE completed with an error or info > PVMFErrNotSupported > 07-21 22:40:20.091: ERROR/MediaPlayer(351): error (1, -4) > 07-21 22:40:20.141: ERROR/MediaPlayer(351): Error (1,-4) > 07-21 22:40:20.141: DEBUG/VideoView(351): Error: 1,-4 > > and the video can not be played. > > What am I doing wrong that is not applicable to Android platform? > > Thanks in advance. > > Manny > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

