controller - Play song in android in default media player.... i dont want to create my own -


hi guys want make simple application. have 1 button when clicked play song who's uri hard coded. want user click button , song play in default media player don't have code media player buttons.

is possible ? u have better approach?

this whole situation arises problem of fetching album art :)

maybe helps ya:

        mediaplayer mp = new mediaplayer();          mp.setlooping(true);     try {         mp.setdatasource(mfile);     } catch (illegalargumentexception e) {         e.printstacktrace();     } catch (illegalstateexception e) {         e.printstacktrace();     } catch (ioexception e) {         e.printstacktrace();     }     try {         mp.prepare();     } catch (illegalstateexception e) {         e.printstacktrace();     } catch (ioexception e) {         e.printstacktrace();     }     mp.start(); 

mfile path mp3-file. maybe can share uri instead.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -