Where did the null exception occur? Stack trace?

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.


On Aug 13, 8:57 am, zeeshan <[email protected]> wrote:
> yes i already tried it but it gives me null exception
>
> On Aug 13, 4:17 pm, zeeshan <[email protected]> wrote:
>
> > Hi Dear,
>
> > i am trying to play a video in my activity before i load my main page
> > of my application.
>
> > i have created another activity PlayIntro as follows
>
> >  private void playVideo() {
> >         try {
>
> >                        /*
> >                      * TODO: Set the path variable to a local media
> > file path.
> >                      */
> >                     path = "/sdcard/intro.mp4";
>
> >             // Create a new media player and set the listeners
> >             mMediaPlayer = new MediaPlayer();
> >             mMediaPlayer.setDataSource(path);
> >             mMediaPlayer.setDisplay(holder);
> >             mMediaPlayer.prepare();
> >             mMediaPlayer.setOnBufferingUpdateListener(this);
> >             mMediaPlayer.setOnCompletionListener(this);
> >             mMediaPlayer.setOnPreparedListener(this);
> >             mMediaPlayer.setAudioStreamType
> > (AudioManager.STREAM_MUSIC);
>
> >         } catch (Exception e) {
> >             Log.e(TAG, "error: " + e.getMessage(), e);
> >         }
> >     }
>
> > /////////////////////
>
> > it does play the video and i call finish(); on completion.
>
> > now the problem is :
> > i have video in my raw folder rather than in my sdcard. how can i load
> > from raw folder
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to