How To: Get Custom Hotword Detection to Launch Any App on Your Nexus 5

Get Custom Hotword Detection to Launch Any App on Your Nexus 5

The release of the Nexus 5 marked the debut of the Google Now Launcher. Even with an integrated Google Now page on your home screen, the most talked-about feature was actually the always-listening functionality.

From anywhere on your home screen, this function allowed you to say "Okay, Google" to trigger a voice search. Various tweaks have since been made available that can customize this functionality a bit, but none have succeeded in changing the actual hotword from "Okay, Google"—until now.

The developers behind the popular custom ROM OmniROM have ported this feature into AOSP's own Launcher3 (now known as KitKat Launcher). They didn't just clone Google Now Launcher's functionality, though—with Launcher3, you can add any word or phrase that will trigger any app or action. This feature uses Omni's framework, so you'll have to be running OmniROM to try this one out.

Prerequisites

Step 1: Download the Relevant Files

There are a few files that you'll need to download to get this mod going. First is OmniROM itself—just tap this link from your Nexus 5 to start that download.

Next is the Google apps package ("GApps"). Since custom ROMs aren't allowed to distribute Google's proprietary apps and services as an integrated part of their OS, you'll have to add these features separately. Again from your Nexus 5, tap this link to grab the GApps.

If you want your new ROM to be rooted, you'll also need to download Chainfire's SuperSU from this link.

Step 2: Create a New File on Your SD Card

The GApps package that you just downloaded will replace AOSP apps with their proprietary Google equivalents. This includes the launcher that Omni uses to give you custom hotwords. To prevent this launcher from being overwritten by the GApps package, you'll just need to create a new file on your SD card.

I'll be demonstrating this step using FX File Explorer, which is a free app available on Google Play here. From FX's main screen, tap Main Storage to begin. This will take you to the top of your SD card's directory.

From here, tap the three-dot menu button up top and choose New File. Make sure that Empty File is highlighted on the next screen, then name this file .gapps-stock and press OK.

Next, FX will ask you what you want to open this new file with. Select Text Editor, then on the next screen, type launcher. Hit the three-dot menu button again and tap Save.

Step 3: Back Everything Up

After flashing this new ROM, files that are on your phone's internal storage partition will remain intact, but you will lose all of your apps and their associated data.

To preserve these, give the ever-popular Titanium Backup a try. A free version is available on Google Play here. Use this app to back up other installed apps and their data before proceeding.

As with anything that involves using custom recovery, it's best to have a backup of your existing ROM before proceeding. Refer to Jesse's guide on that very subject for help.

Step 4: Boot into Custom Recovery

Now that all of the downloads are finished and you've created the file on your SD card, it's time to boot into your custom recovery.

Start by powering your Nexus 5 completely off. When the screen goes black, hold the Volume Down button on your phone with one finger, then press the Power button with another. This will bring up Android's Fastboot menu, where you should tap the Volume Down button twice to highlight Recovery Mode. Press the Power button to confirm your selection.

Step 5: Perform a Full Wipe

To give Omni a clean slate, you'll need to completely wipe your existing ROM. From TWRP Recovery, head to Wipe, then tap Advanced Wipe.

Next, tick the boxes next to Dalvik Cache, System, Data, and Cache. Swipe the slider at the bottom to confirm your selection, and when the process is finished, hit the Home button at the bottom-left.

Step 6: Flash OmniROM

Next, tap Install, then browse to your Download folder to select the Omni...zip file you downloaded earlier.

From the next screen, tap Add More Zips, then select the pa-gapps ZIP file.

If you elected to download SuperSU in Step 1 so that your phone will be rooted, tap Add More Zips once more. From here, select the UPDATE-SuperSU ZIP file.

Now, just swipe the slider at the bottom to initiate the install process. When it's finished, hit Reboot System.

Keep in mind that first boot always takes longer than normal, so give your phone as much as five minutes to finish booting here.

Step 7: Add Custom Hotwords

When you're back up, you'll be asked to go through Android's initial setup. Just follow the prompts until you arrive at this screen:

Launcher3 is the home screen app that allows you to enter custom hotwords on Omni, so select that option, then press Always.

Launcher3 looks and behaves almost exactly like the Google Now Launcher from the stock Nexus 5 firmware, but without the Google Now page on the leftmost screen. You even get the same feature tour that you saw when you first booted your Nexus 5.

To add a custom hotword, start by long-pressing any empty space. Select Settings from the next menu.

Scroll down to the bottom of this list and tap Customize hotwords, then tap Add new hotword from the next screen.

In the text field, type any word or phrase that you would like to use as a voice command, then press OK. Next, hit Select an action to choose what app or action that you want this hotword to trigger.

From this next list, you can choose an app that will be launched with your voice by heading to Apps. You can also launch app-specific activities via Activities, among other options.

I'll demonstrate how to have your launcher open a bookmark with a voice command. Hit Bookmarks, then choose one of your Google-synced bookmarks from the next menu.

Finally, just tap OK to confirm your choices.

Step 8: Using Your New Hotwords

Any time you're on your home screen now, you can trigger the action that you set up. You can add as many different actions and trigger phrases as you'd like.

To execute an action, just say your hotword. No need to start with "Okay Google", just say it exactly as you typed it. The app or activity will launch right away.

The possibilities are virtually endless here. Try different apps and activities, and if you're feeling frisky, get creative with a Tasker profile.

What hotwords are you using? What activities are they set to launch? Tell us about them in the comments section below.

Be the First to Comment

Share Your Thoughts

  • Hot
  • Latest