# In activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:design="http://schemas.android.com/apk/res-auto"
tools:context="com.spidytechnology.demoproject.MainActivity">
<VideoView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/VideoView"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" /> </RelativeLayout>
# Create a raw folder in Resource file
paste you video in raw folder
#In MainActivity.Java
import android.net.Uri; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.VideoView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); VideoView videoView = (VideoView) findViewById(R.id.VideoView); String uriPath = "android.resource://com.spidytechnology.demoproject/"+ R.raw.spidyintro; Uri uri = Uri.parse(uriPath); videoView.setVideoURI(uri); videoView.requestFocus(); videoView.start(); } }