ok Nelisson , I will , but tell me how can load a movie from resource through media Player or any other alternative,please .........
On Aug 18, 9:00 pm, Marco Nelissen <[email protected]> wrote: > On Tue, Aug 18, 2009 at 12:07 AM,rizwan<[email protected]> wrote: > > > Hi, > > > I m trying to run a simple media player activity .............. > > > public void onCreate(Bundle icicle) { > > super.onCreate(icicle); > > > try { > > > /* > > * TODO: Set the path variable to a local media > > file path. > > */ > > setContentView(R.layout.mediaplayer_2); > > mPreview = (SurfaceView) findViewById(R.id.surface); > > holder = mPreview.getHolder(); > > > // Create a new media player and set the listeners > > mMediaPlayer = MediaPlayer.create(this, R.raw.lucky); > > mMediaPlayer.setDisplay(holder); > > mMediaPlayer.prepare(); > > That won't work, because MediaPlayer.create() calls prepare() > internally, and you can't call prepare() twice. > It shouldn't cause a native crash though. Can you file a bug > athttp://b.android.com, and attach the file you're trying to play? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

