This is a sample activity which shows How to run a video file.
Basic description of algorithm in step by step form:
1.) Create a Project VideoViewExample.
2.) Put a video file in raw folder and keep it inside the res folder.
3.) Put the following code snippet in main.xml:
1.) Open Eclipse. Use the New Project Wizard and select Android Project Give the respective project name i.e. VideoViewExample. Enter following information:
Project name: VideoViewExample
Build Target: Google APIs
Application name: VideoViewExample
Package name: com.sample.VideoViewExample
Create Activity: VideoViewExample
On Clicking Finish VideoViewExample code structure is generated with the necessary Android Packages being imported along with VideoViewExample.java. VideoViewExample class will look like following: