Default Album Art grab code

I 'm developing a car mode app. So i have a music app shortcut with play prev and next button. I need the code to take the album cover of the music playing and use it as background. I googled it but didnt find anything so any help would be usefull!! thanks in advance