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
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: 39552
    
  27
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 - updated with new look and Ping home screen widget
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369

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 ...
 
wood burning stoves
 
subject: To play video in android application
 
Similar Threads
Media format for video streaming
Playing video file
SWF (flash)files support.
Java base WEB video player
Playing Video files on javaFx (embedded on html page, and pop-up version)