Hi I'm trying to achieve an Activity with background made from video file. The solution posted below is working on most devices, except nexus 6 Android 5.1. The video is working, is scaled but is not cropped, so aspect ratio is not preserved.
Tested with Galaxy Note, HTC One m7, Xperia Z3, Nexus 5.
Here is the code:
public class MainActivity extends ActionBarActivity implements SurfaceHolder.Callback, OnClickListener
private static final int VIDEO_START_HACK_DELAY = 0;
private static final String BG_VIDEO_PATH = "/raw/construction";
private SurfaceView mSurface;
private Button mTour, mLogin;
private MediaPlayer mMediaPlayer;
private Handler mHandler = new Handler();
protected void onCreate(Bundle savedInstanceState)