java - MediaPlayer not playing files from Android Emulator's SD Card -


i've been working on mp3 player in android studio 2.3.3, haven't been able make mediaplayer class work. i've uploaded mp3 files on virtual android device (android 7.0), cannot set correct path of them. pretty simple:

try{     mediaplayer mediaplayer = mediaplayer.create(mainactivity.this, uri.parse("/storage/emulated/0/03. bloom.mp3"));     mediaplayer.prepare();     mediaplayer.start(); } catch (exception ex){} 

but doesn't want work. i've tried also

mediaplayer mediaplayer = mediaplayer.create(mainactivity.this, uri.parse("file:///storage/emulated/0/03. bloom.mp3")); 

neither of options work. i'm sure song in folder (proof pic).

i appreciate help, thank you.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -