-4

I want to start my app/service when another app get's active or music is played from that app. Is this possible with Android?

knurzl
  • 358
  • 3
  • 10

1 Answers1

0

If You are specifically looking for starting your service when music player starts, take a look at AndroidManager API. You can register for callbacks using registerAudioPlaybackCallback

Also there is method from same AudioManager which tells you if Music isActive isActive - Stackoverflow

isMusicActive

kukroid
  • 420
  • 6
  • 15