Isn't it cool to launch a music player app as soon as you plug in your earphones on LG G5? To open an app automatically on LG G5 when headphones are plugged in, do as follows:
1. Open the Settings app and go to the General tab
2. Under the Smart Functions settings, touch to open the Smart Settings option
3. Now, open the When Earphone are Plugged in option
4. First turn on the feature using the sliding button and then touch the App option and specify the app you want to be launched when you plug in your earphone.
5. The specified app will automatically run when your headphone is connected to your LG G5.