from the debug info, it seems that the VideoIntent from the MainActivity cannot send the path of the video to VideoActivity. It gives a NullPointerException
error from the uriString
. I think some of that code from VideoActivity
:
Intent myIntent = getIntent();
String uri = myIntent.getStringExtra("uri");
Bundle b = myIntent.getExtras();
startVideo(b.getString(uri));
Cannot receive the uri from here:
public void playsquirrelmp4(View v) {
Intent VideoIntent = (new Intent(this, VideoActivity.class));
VideoIntent.putExtra("android.resource://" + getPackageName()
+ "/"+ R.raw.squirrel, uri);
startActivity(VideoIntent);
}