• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To play video in android application

 
Nehel Patel
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nehel Patel
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply ulf and Monu...

I will convert it first ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic