I recommend that at the time of formulating you be more specific or at least show something that you have done, this is where we start. Also, I was recently working with MediaPlayer, the Android class to play audios. I recommend you read the documentation or try to follow this good tutorial . Here is an example of a test I have done with a file of mine hosted in the cloud.
//play from url
public void playURL(){
String finalURL = "https://drive.google.com/open?id=1cEhQvS5Nmnsynvlt44EYhi3cdWC-tSJX";
if (player == null){
Log.d(Constants.AUDIO_LOG_TAG, "Player is null. Call init() before using it! ");
return;
}
try {
player.reset();
Log.d(Constants.AUDIO_LOG_TAG, "Playing from url: " + finalURL);
player.setDataSource(finalURL);
player.prepareAsync();
} catch (Exception e) {
Log.e(Constants.AUDIO_LOG_TAG, "Error playing file " + finalURL, e);
}
I repeat, first look at all the MediaPlayer documentation because there is a lot of relevant information: MediaPlayer states, callbacks, what is reset, release ... etc.
I hope you have been helpful.