Tasker does this as well, but if you donít want complexity and want free, this is a great program.
This app provides a background service that will launch a specified app when the Power/USB cable and/or Headphone cable is connected to the device.
Tired before bed and want the Alarm clock app to launch when you plug it in to charge? Go ahead and plug it inÖ AND ITS THERE!
Out on a run and want to quickly launch your music player app? just plug in your headphones and click play!