I downloaded an app I saw yesterday, it was designed to automatically change your volume to a predefined level when you plugged in your headphones then back to a different predefined level when you took them out. I thought that's a great idea and proceeded to download and install straight away...
It was only this morning I realised how pointless that was, I could create a profile for tasker which would actually do the job better. Stupid thing is that it's probably one of the most obvious/easiest profiles to even create!
Context: State > Hardware> Headset Plugged > No Mic
Task: Audio > Media Volume > 2
If you plug your headphones in during configuration you can hear how loud 2 is and adjust accordingly. Media volume is a setting and so is automatically reset when the context state ends. In addition, I also have
App > Load App > Music
to open my music app when I plug in headphones.
Why is this any better?
It's better than the app I downloaded because it resets the media volume to whatever it was before hand. Imagine you want to be quiet on a train (volume set low) and later plug in headphones to listen to music. If you then unplug your headphones you wouldn't want your phone to suddenly be normal loudness, you would want it to still be quiet. [Subtle advantage, I'll accept that]
If you don't have tasker, the concept is good so you will probably want it anyway... the app was called Hearing Saver.