I\'m using MediaSessionCompat
from AppCompat Support Library Revision 22. And on Lollipop I\'m getting notification & also the background of lockscreen is the a
Finally I figured a solution for this. Thanks to @ianhanniballake & @user1549672
BroadcastReceiver
can be found if searched on Google & also on Official Android DocssetupMediaSession()
given in my question aboveFlags
properlyMediaSessionCallbacks
also available aboveMediaSession
on MediaPlayer#onPause()
, MediaPlayer#onStart()
& finally when new song is played (also includes next & previous played) mentioned by @user1549672MediaSession
object in onDestory()
Well that's all, most of the material (code) is available above. This question took couple of months to solve, finally it's done.