I have a small app which runs in background doing some tasks which basically detects the user behavior inside the Android Music application.
I want to check in background if the user pressed the back, play/stop or skip button. It seems like I can access information about the current playing song but I have no idea how to put an "observer" to watch those buttons.
Does anyone have an idea to help with?
I could solve my problem!
I checked the Android Music App source code and there’s a class on com.android.music.MediaPlaybackService wich gives control and you can even switch between activities.
I created a BroadcastReceiver inside a background thread to watch anything from MediaPlaybackService.