• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

To play video in android application

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43077
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply ulf and Monu...

I will convert it first ...
 
crispy bacon. crispy tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic