title: Android Vitamio 4.2 update 5.0 crash
body: <p>I updated Vitamio 4.2.2 to 5.0.0 as Google requested because of security issues in developer console. But with the same codes. Only changed Vitamio.isInitialized(getApplicationContext()); There is not error. Application was installed. But video not playing. How can i do for this?</p>
  
  <p>public class MainActivity extends Activity implements MediaPlayer.OnBufferingUpdateListener, MediaPlayer.OnCompletionListener, MediaPlayer.OnPreparedListener, MediaPlayer.OnVideoSizeChangedListener, SurfaceHolder.Callback {</p>
  
  <pre><code>private static String TAG = MainActivity.class.getSimpleName();
  private static String ShowTV = "http://mn-i.mncdn.com/showtv_ios/smil:showtv.smil/playlist.m3u8";";
  private TextView tvLoader;
  private int mVideoWidth;
  private int mVideoHeight;
  public MediaPlayer mMediaPlayer;
  private SurfaceView mPreview;
  private SurfaceHolder holder;
  private boolean mIsVideoSizeKnown = false;
  private boolean mIsVideoReadyToBePlayed = false;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      Vitamio.isInitialized(getApplicationContext());
  
      if (Build.VERSION.SDK_INT &lt; 16)
          getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
      else
          getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
  
      tvLoader = (TextView) findViewById(R.id.tvLoader);
      mPreview = (SurfaceView) findViewById(R.id.surface);
      holder = mPreview.getHolder();
      holder.addCallback(this);
      holder.setFormat(PixelFormat.RGBA_8888);
  }
  
  
  public void playVideo() {
      doCleanUp();
      try {
  
          // Create a new media player and set the listeners
          mMediaPlayer = new MediaPlayer(this);
          mMediaPlayer.setDataSource(ShowTv);
          mMediaPlayer.setDisplay(holder);
          mMediaPlayer.prepareAsync();
          mMediaPlayer.setOnBufferingUpdateListener(this);
          mMediaPlayer.setOnCompletionListener(this);
          mMediaPlayer.setOnPreparedListener(this);
          mMediaPlayer.setOnVideoSizeChangedListener(this);
          setVolumeControlStream(AudioManager.STREAM_MUSIC);
  
      } catch (Exception e) {
          Log.e(TAG, "error: " + e.getMessage(), e);
      }
  }
  
  public void onBufferingUpdate(MediaPlayer arg0, int percent) {
      // Log.d(TAG, "onBufferingUpdate percent:" + percent);
  
  }
  
  public void onCompletion(MediaPlayer arg0) {
      Log.d(TAG, "onCompletion called");
  
  }
  
  public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
      Log.v(TAG, "onVideoSizeChanged called");
      if (width == 0 || height == 0) {
          Log.e(TAG, "invalid video width(" + width + ") or height(" + height + ")");
          return;
      }
      mIsVideoSizeKnown = true;
      mVideoWidth = width;
      mVideoHeight = height;
      if (mIsVideoReadyToBePlayed &amp;&amp; mIsVideoSizeKnown) {
          startVideoPlayback();
      }
  }
  
  public void onPrepared(MediaPlayer mediaplayer) {
      Log.d(TAG, "onPrepared called");
      mIsVideoReadyToBePlayed = true;
      tvLoader.setVisibility(View.GONE);
      if (mIsVideoReadyToBePlayed &amp;&amp; mIsVideoSizeKnown) {
          startVideoPlayback();
      }
  }
  
  public void surfaceChanged(SurfaceHolder surfaceholder, int i, int j, int k) {
      Log.d(TAG, "surfaceChanged called");
  
  }
  
  public void surfaceDestroyed(SurfaceHolder surfaceholder) {
      Log.d(TAG, "surfaceDestroyed called");
  }
  
  public void surfaceCreated(SurfaceHolder holder) {
      Log.d(TAG, "surfaceCreated called");
      playVideo();
  
  }
  
  @Override
  protected void onPause() {
      super.onPause();
      releaseMediaPlayer();
      doCleanUp();
  }
  
  @Override
  protected void onDestroy() {
      super.onDestroy();
      releaseMediaPlayer();
      doCleanUp();
  }
  
  public void releaseMediaPlayer() {
      if (mMediaPlayer != null) {
          mMediaPlayer.release();
          mMediaPlayer = null;
      }
  }
  
  private void doCleanUp() {
      tvLoader = (TextView) findViewById(R.id.tvLoader);
      tvLoader.setVisibility(View.VISIBLE);
      mVideoWidth = 0;
      mVideoHeight = 0;
      mIsVideoReadyToBePlayed = false;
      mIsVideoSizeKnown = false;
  }
  
  private void startVideoPlayback() {
      Log.v(TAG, "startVideoPlayback");
      holder.setFixedSize(mVideoWidth, mVideoHeight);
      mMediaPlayer.start();
  }
  </code></pre>
  
  <p>}</p>