How to pass uri to mediaSource in Android Q since MediaStore.Audio.Media.DATA
is deprecated
Earlier (Below Api 29 / Android 10/ Q) This is what i was using
mediaSource = new ProgressiveMediaSource. Factory(dataSourceFactory).createMediaSource(Uri.parse(SongsForQueue.get(i)._path));
simpleExoPlayer.prepare(mediaSource);
simpleExoPlayer.setPlayWhenReady(true);
Where SongsForQueue.get(i)._path was the path of the file which we got from MediaStore.Audio.Media.DATA
since Android Q deprecated MediaStore.Audio.Media.DATA what can we use
Android suggests
https://stackoverflow.com/a/59037794
use
ContentResolver#openFileDescriptor(Uri, String).
how can we do that any help would be useful