aspose file tools*
The moose likes Android and the fly likes To play video in android application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "To play video in android application" Watch "To play video in android application" New topic
Author

To play video in android application

Nehel Patel
Greenhorn

Joined: Feb 09, 2010
Posts: 21
Hi,

I want to play video file which is in '.AVI' format, placed in 'res/raw' folder of my android project.

Please send me the link which contains example for this or a code snippet so that I can implement this in my application.

Regards
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
According to the documentation (which also contains code examples that show how to play video) Android supports the 3GPP and MPEG-4 formats, so you'll have to convert the file to one of those formats.


Ping & DNS - my free Android networking tools app
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

Nehel Patel wrote:
...Please send me the link which contains example for this or a code snippet so that I can implement this in my application.

Regards


After you have your file converted to a compatible format you can play it using MediaPlayer or a VideoView.
For starters you can take a look at code samples under:
SDK_HOME\platforms\android-2.0\samples\ApiDemos\src\com\example\android\apis\media


[List of FAQs] | [Android FAQ] | [Samuh Varta]
Nehel Patel
Greenhorn

Joined: Feb 09, 2010
Posts: 21
Thanks for the reply ulf and Monu...

I will convert it first ...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: To play video in android application