At the begging I know to save/restore variables in the rotate process. I need to store the state of SimpleExoPlayer whether play or paused
ExoPlayer doesn’t restore its state on rotation (even if it is on paused the video always starts playing on configuration change) because I used this line of code
mExoPlayer.setPlayWhenReady(true);
so in case of user clicked in pause and rotate the screen it still start
when I googled for this issue I found that I must use a boolean variable instead of true
mExoPlayer.setPlayWhenReady(playWhenReady);
but I found the mExoplaer variable with a null
the screen for debugging here
the screen of code in on saveInstance here
the screen of retrieve of boolean variable here
the screen of mExoPlayer init here then invoke this method in inCreateView
can anyone help me?