Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

New Forums: Nexus Player | Nexus 9
test: Reply
 
LinkBack Thread Tools
Old November 20th, 2010, 03:55 PM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2010
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with video / audio

I hope this is the correct place to post this. If not, please let me know.

I am creating a small andriod app that plays one video with some audio. I am very very very new to java / android.

I am using Eclipse. If I add one button to the app how would I call the video.

This is not for any projects or for any type of school. I am making this for my HTC evo. I am not going to sell it or anything.

If someone could help me I would really appreciate it.

I know how to get an image but need help with video/audio

Thanks in advanced.

Advertisements
daveofgv is offline  
Last edited by daveofgv; November 20th, 2010 at 04:23 PM.
Reply With Quote
sponsored links
Old November 21st, 2010, 08:10 AM   #2 (permalink)
Member
 
Join Date: Aug 2010
Location: Norway
Posts: 313
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 0
Thanked 53 Times in 51 Posts
Default

Audio:

For audio you need to import this one: android.media.MediaPlayer

And to start a audio file, call this:
MediaPlayer mp = MediaPlayer.create(this, resId);
mp.start();

Video:

For video you need to import this one: android.widget.VideoView

And to start a video, you need a videoview:
VideoView video = (VideoView) findViewById(R.id.video);

And to start the video, call this:
video.setVideoPath("pathtothevideofile");
video.start();
miXer is offline  
Reply With Quote
Old December 1st, 2010, 02:13 PM   #3 (permalink)
New Member
 
Join Date: Nov 2010
Posts: 12
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 1 Time in 1 Post
Default

What about getting a video from youtube to play in the video viewer? I want put a video I made that is on youtube into an app that plays the video when the app is opened.
JMultimediadesign is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:28 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.