Home
Nexus

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

Jun 21, 2014 01:47 AM
635380090064464126.jpg

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.

635379997050063319.jpg
635379997170550841.jpg
635379997050063319.jpg
635379997170550841.jpg

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.

635379994220861227.jpg
635379994371799103.jpg
635379994220861227.jpg
635379994371799103.jpg

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.

635379995281000689.jpg
635379995389907207.jpg
635379995281000689.jpg
635379995389907207.jpg

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.

635379996603043586.jpg
635379996683974034.jpg
635379996763189772.jpg
635379996603043586.jpg
635379996683974034.jpg
635379996763189772.jpg

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.

635380003549127504.jpg
635380003665690213.jpg
635380003549127504.jpg
635380003665690213.jpg

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.

635380004718666144.jpg
635380004871470017.jpg
635380004718666144.jpg
635380004871470017.jpg

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.

635380005805231403.jpg
635380005978813339.jpg
635380007720705087.jpg
635380005805231403.jpg
635380005978813339.jpg
635380007720705087.jpg

Step 6: Flash OmniROM

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

635380008774452938.jpg
635380008967720230.jpg
635380008774452938.jpg
635380008967720230.jpg

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

635380009530068959.jpg
635380009710063707.jpg
635380009530068959.jpg
635380009710063707.jpg

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.

635380010566470759.jpg
635380010700082123.jpg
635380010566470759.jpg
635380010700082123.jpg

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

635380011121782738.jpg
635380011259450361.jpg
635380011121782738.jpg
635380011259450361.jpg

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:

635380012550689946.jpg

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

635380013401782115.jpg

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.

635380014467250757.jpg
635380014569750902.jpg
635380014467250757.jpg
635380014569750902.jpg

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

635380015226784980.jpg
635380015361948220.jpg
635380015226784980.jpg
635380015361948220.jpg

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

635380016614594537.jpg
635380016712428980.jpg
635380016614594537.jpg
635380016712428980.jpg

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.

635380017817122540.jpg
635380017926472823.jpg
635380017817122540.jpg
635380017926472823.jpg

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.

635380019380377400.jpg
635380019485377433.jpg
635380019380377400.jpg
635380019485377433.jpg

Finally, just tap OK to confirm your choices.

635380020183972790.jpg
635380020290689962.jpg
635380020183972790.jpg
635380020290689962.jpg

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.

635380021359440111.jpg
635380021458502207.jpg
635380021359440111.jpg
635380021458502207.jpg

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.

Comments

No Comments Exist

Be the first, drop a comment!