I need that to fade out my music app and resume it.

Or any api that can do the same thing is OK for me.

Thank you.