I try to play an audio file from the micro SD card in Nokia 6131. The following code is what I used:
FileConnection fileConnection = (FileConnection) Connector.open(path);
InputStream inputStream = fileConnection.openInputStream();
Player player = Manager.createPlayer(inputStream, mimeType);
String contentType = inputStream.getContentType();
catch (Exception e)
However, I always get "Device Error" exception during start(). I have verified that getContentType() returns correctly.
I have also tried the MediaSampler midlet (original .jar as well as recompiled .jar), both give the same "Device Error" exception. What could be wrong? Any suggestion on the source code?