MediaPlayer 'prepare();' problem
When I use prepare(); on my mediaplayer, a black layout pops up till the mediaplayer is prepared.. I want to change that black screens layout, is that possible? prepare(); is a blocking operation, if you dont want to block your UI Thread use prepareAsync(); . Or use prepare in another Thread Do all these thing in background thread until media player instance prepared the resource to play and show progress bar upto that time //progressDialog Thread th=new Thread(new Runnable() { @Override public void run() { MediaPlayer md=new MediaPlayer(); try { md.setDataSource("Path"); md.prepareAsync(); md