How to Use Headphones to Automatically Launch Apps on Your HTC One
Every morning I walk out the door with my headphones plugged in and music blaring. While it's not be the most difficult thing in the world, unlocking my phone and starting my music manually every time feels like a hassle. Pressing play on my headphone's remote will auto-start music in the HTC Music app, but I prefer Google Play Music instead.
Now, thanks to Headphone Connect by Gabe Brandao, which is free on Google Play, I can start my tunes faster and hassle-free. This app will auto-start any app chosen whenever earphones are first plugged in. Best of all, root is not required, it works for both the HTC One M7 and M8, and is nowhere near as complicated as the Llama approach.
Before you actually start using the app, you should go to Settings -> Apps -> Headphone Connect and uncheck the box next to Show notifications. This will prevent your status bar from showing the ongoing notification that comes with Headphone Connect, but it will still function properly.
Before we start assigning which apps will open when you connect headphones, let's go over the settings menu.
In the General section, enable the Start on Reboot option so that you don't need to manually enable the app after a reboot.
To have one dedicated app launch when headphones are plugged in, check the box next to Single App Default. If you enable multiple apps, or leave this option unchecked, you'll see a dialog box pop up, allowing you to choose the app you want to launch.
Under Connect, you can enable apps to work with Bluetooth headphones, and even set up a Blacklist that will stop selected apps from being interrupted by the connection dialog box.
Basically, this function is for those apps that you don't want interrupted by a headphone plug-in, like Netflix or Google Play Music. If you're already watching a movie or listening to music, you likely will not need to select a new app when headphones are plugged in.
There is also the option to adjust the volume when you plug in. This can either be set to a default percentage, or you can have the volume slider pop up when you connect.
The Disconnect menu will only be active if you purchase the unlock feature from Google Play. Coming in at a very reasonable $1.08, you'll get options to open a different app and reset the volume back to default when unplugging headphones.
To get the Blacklist set up, drag out the sidebar from the main app window and tap Connect Blacklist. Toggle the blacklist on, then tap the + on the top right to start adding apps to it.
Adding an app to open is as easy as tapping +, then placing a check mark next to the apps you want to have the option of opening.
After selecting your apps, tap the back arrow on the top left and you'll be set!
Now when you plug in your headphones, you will get a dialog box asking what you want to open. If you selected the Single App Default option, you do not even need to unlock you phone, just plug your headphones in and press the mic button on the headphones to auto-play music from the opened app!