I'm writing a program in which I need to play a song from storage. I set up a MediaPlayer for this (code fragment below), but kept getting a java.io.IOException: Prepare failed.: status=0x1. Some websites indicated that this error may occur because the files I am trying to read are not world readable. If this is true, how could I change the file permissions from the program, get around this, or some other solution. If not, please help me figure out what is wrong with this. Thanks in advance.
MediaPlayer player = new MediaPlayer();
player.reset();
player.setDataSource(selectedFilePath);
player.prepare();
player.start();