Check your phones settings to see if you have a "smart settings" section.
"Play music using app BBBB" is usually one of the options under the "when headphones are plugged in" section.
Otherwise,
Which phone?
Which version of android?
Which carrier?
Which music app?