I would like to make a small video (about 4 seconds) repeat until webview finishes loading the desired URL in the background. Right now the video plays once, then a blank black screen comes up until the page loads. I'm still pretty new to this... Thanks in advance for any help! Sorry for the EDITED stuff, but it was necessary.
Here is my splash java
package com.EDITED;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.os.Bundle;
import android.widget.VideoView;
public class Splash extends Activity implements OnCompletionListener
{
VideoView videoView;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
VideoView video = (VideoView) findViewById(R.id.videoView);
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
video.setVideoPath("android.resource://com.EDITED/raw/" + R.raw.splash);
video.start();
}
@Override
public void onCompletion(MediaPlayer mp)
{
Intent intent = new Intent(this, EDITEDActivity.class);
startActivity(intent);
finish();
}
}