How to I get video to play from storage?

by » Wed, 03 Dec 2008 14:28:06 GMT

Sponsored Links
 Hi there,

I am very new to android/programing and would like some help
please :)

I have the android SDK running on eclipse and was wondering how to
create an app that:

1. Plays a specific video I want to release (For example; I publish
the application with a 90 sec video, my app plays it, allows users can
forward, rewind ect.)

I do NOT want the users to be able to play their videos, just mine :)
(For the moment, then I wish for users to interact w/ it, but first
let me make my video play)

Any help will be very very appreciated, especially commented code; (I
am a complete noob remember)

Thank you for your time,
Kind regards,


How to I get video to play from storage?

by Girish » Wed, 03 Dec 2008 19:27:26 GMT

 Dear Turk ,

if you just want to play a video on android emulator these are the

go to this location

                    path = "/sdcard/Yourfilename"; //add your file
name here

Save and quit

run make command .

This will buiild out/target/product/generic/data/app/ApiDemos.apk

Now do adb install out/target/product/generic/data/app/ApiDemos.apk

Now place the videofile (Yourfilename) in /sdcard like this
adb push Yourfilename  /sdcard

Go to apidemos ->media- >mediaplayer -> play video from local file

This should start playing the video which u place in the /sdcard.

Please let me know if you have any other question


On Dec 3, 7:58am, "[EMAIL PROTECTED]"


Sponsored Links

How to I get video to play from storage?

by mangesh » Fri, 05 Dec 2008 06:27:12 GMT

 hi Girish

I am working on android ported on  beagle. While playing video from
media player it is not able to draw anything & giving error going out
of memory . About 25 MB memory is still free. Can u tell me how much
memory is required by media player to play video



How to I get video to play from storage?

by Turk » Wed, 17 Dec 2008 04:37:30 GMT

 Thanks for the help, I got as far as going to the

but didn't know which path to edit; then didn't know how run make
command so I pressed run; to get emulator;  that's is as far as I got
any help please?

Sorry for the silly questions like I said I'm new :):)

Kind regards,


How to I get video to play from storage?

by Girish » Wed, 17 Dec 2008 12:07:10 GMT


Which OS you are using ? I use ubuntu OS. If you have the source code
then you need to build it using make command or using eclipse IDE....

For example change the path to path = "/sdcard/test.3gp"

First try executing Helloworld program as is given in this link. Then
you can try out for playing the audio/video files. 



How to I get video to play from storage?

by hc huang » Wed, 17 Dec 2008 22:05:47 GMT

 Hi Girish
I want to a audio.I go to this position
then save and re-install,but when I go to apidemos ->media- >mediaplayer ->
play audio from local file,it doesn't work.No voice .I hope you could help
me to analysis
this problem.Thank you!


How to I get video to play from storage?

by Dave Sparks » Fri, 19 Dec 2008 03:05:37 GMT

 t seems like you're trying to play the file from your workstation. I
assume you are testing in the emulator. If so, you need to be aware
that the emulator has its own file system and it cannot directly
access your workstation files. Instead, it mounts a file that contains
an image of a FAT file system. You can create the file with the
mksdcard tool and then specify the file to use with the -sdcard
command line option in the emulator.

With the SD card image mounted, you need to push the data file to your
SD card image like this:

adb push /home/huang/sdcard/onelove.mp3 /sdcard

which copies the file to /sdcard/onelove.mp3. Now you can pass the
path to the media player by setDataSource("/sdcard/onelovemp3");

On Dec 17, 6:05am, "hc huang" <> wrote:


How to I get video to play from storage?

by hc huang » Fri, 19 Dec 2008 17:21:41 GMT

 i ,Dave Sparks.
Thanks for your help,Now the solution you give works well.And the problem
has already solved.I find that when I pass the path to the media player,what
I use is like this-setDataSource("/home/huang/sdcard/onelove.mp3"),but not
by setDataSource("/sdcard/onelovemp3");because the emulator has its own file
system,so I use the wrong file path.
Thank you!

On Thu, Dec 18, 2008 at 5:07 PM, Dave Sparks <>wrote:


Other Threads

1. 3D Maps for Android


I am currently working on an Android application with Map based
activity. Its displaying the map fine. However I recently read about
the 3D maps being available for Android. How can I incorporate these
maps into my app.




2. Sold ( wts zte blade )

{*filter*}tara hh nya sudah di book
Tinggal nunggu transfer

Terimakasih buat yg sudah japri
Dan mohon maaf ga bisa balas satu2 

Kalau batal besok pagi saya update

Selamat malam
Berhubung mau meminang hh lain

Mau jual
zte blade (orange san francisco)
Mulus banget
Full set paket pembelian
Mmc 2 G
Froyo with Modaco Custom Rom
Theme gingerbread
Kalau mau incip2 hh android murmer dengan layar kinclong dan oprekable layak di 

Harga 1,85 jt nett

Berminat hubungi

Posisi saya besok di malang smp minggu

** @ndro-id  **


3. How to submit one game with separate apk files for each device size.

4. Protected memory space

5. Porting linux target box to Andriod bsed

6. "" search button select issue on WebView

7. how to convert colour image to black and white