How to I get video to play from storage?

by mrhasandemi...@gmail.com » 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,
Turk


--~--~---------~--~----~------------~-------~--~----~



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
steps

go to this location
/development/samples/ApiDemos/src/com/example/android/apis/media/
Edit MediaPlayerDemo_Video.java

                    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

Regards
Girish



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

thanks
Mangesh





--~--~---------~--~----~------------~-------~--~----~



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
MediaPLayerDemo_Video.java

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,
Turk




--~--~---------~--~----~------------~-------~--~----~



How to I get video to play from storage?

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


 Turk,

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.

 http://code.google.com/android/intro/hello-android.html 

Regards
Girish





--~--~---------~--~----~------------~-------~--~----~



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
/development/samples/ApiDemos/src/com/example/android/apis/media/
Edit MediaPlayerDemo_Audio.java
             path="/home/huang/sdcard/onelove.mp3"
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" <chinahhu...@gmail.com> 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 <davidspa...@android.com>wrote:


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. TTS voice quality

The improvement in SDK 1.6 voice quality over the previously available
voice (i.e., tts_1.4_market.apk) is very impressive.  It is also nice
to be able to run TTS on the emulator without any special setup.
Kudos, Charles et al!

With the clearer voice, a minor problem with occasional clipping is
now noticeable.  (I verified the clipping by using synthesizeToFile()
and viewing the resulting .wav file with Audacity.)  I suspect volume
control is one of the HashMap parameters that can be passed to
synthesizeToFile(), but I don't see any HashMap parameter
documentation.  Is there any HashMap parameter documentation yet?

Thanks,
Greg
--~--~---------~--~----~------------~-------~--~----~

2. lucene api

hi i am new to android .
i have developed a application
in that application i want a feature of global search in xml file
now  i want to use Lucene api for global search
can i use in android?

if yes than plz tell me how can i implements that in my android code

thanx
jaimin.

--~--~---------~--~----~------------~-------~--~----~

3. Development on the MyTouch 3G

4. installation woes...

5. clear activity stack and replace with a new activity

6. Routing audio to within the call

7. Issue (bug) reports because of custom ROMS, varying configurations, etc.