I am trying to use exoplayer in my app, and i am following MVVM design pattern, i want to make PlayerViewModel class where it handle all the actions of player (play tracks,pause,next,... so on), but i faced a problem that i need to initialize the SimpleExoPlayer with context but ViewModel could not have context
SimpleExoPlayer exoPlayer = ExoPlayerFactory.newSimpleInstance(getApplicationContext(), trackSelector);
any suggestion what i should do ?
Thanks in advance