70.6 Configuring the VideoView
The next step is to configure the VideoView with the path of the video to be played and then start the playback. This will be performed when the main activity has initialized, so load the MainActivity.java file into the editor and modify it as outlined in the following listing:
package com.ebookfrenzy.videoplayer;
.
.
import android.widget.VideoView;
import android.net.Uri;
.
.
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;
private VideoView videoView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityMainBinding.inflate(getLayoutInflater());
...