Tasker tutorials. Part 1: Add Your Teams to Google Now

  • Tutorial
The first article in a series aimed at turning a regular smartphone into a real advanced gadget for a true geek.
The purpose of this series of articles is to teach how to automate the actions related to a smartphone as much as possible and to show interesting areas of application for a smartphone.
Tasker is a powerful tool for automating the actions of the phone and its interaction with the outside world.
You can perform various actions as a reaction to applications (start / stop), time, date, change of location, indicators of phone sensors or events (including various plugins).
In the first part of the cycle, we will consider the possibility of adding your teams to Google Now and performing various actions after recognizing the team, which can take home automation to a new level.

Google now

Currently, Google Now supports a limited list of voice commands that can be found on the official support page . In one of the previous updates, the recognition of the phrase “OK, Google” in Russian was included.

Then they added phrase recognition on any screen (previously it was only on the desktop and in Google Now cards), although it officially only works in English so far. There was already an article on the hub with accessible commands and on YouTube there are many videos with examples.
With the help of voice, you can dial SMS, make calls, create notes and set a timer / alarm, etc. ... But what if this is not enough and you want to add your own commands? For example, "Turn off Wi-Fi" still does not work even in English. Just sends to settings.
If it’s interesting how to add almost any voice command for Google Now without root rights (I’ll make a reservation right away, only on supported devices), I ask for cat. This will add almost unlimited possibilities of home automation and just help make life easier and free up time.

So, the function of active listening to commands on the desktop is available for android since version 4.2. On lower versions, you must click on the microphone icon forcibly.
If you say "Ok Google. Turn off wifi ”, then we will first be shown a card and after a couple of seconds a window with wifi settings will open, where you need to press the button to turn off.

Next, using the same command as an example, I will show how to make wifi turn off by itself. By analogy, you can configure the execution of any commands that can only come to mind ... well, almost.


The main program with which we will respond to voice commands and control surrounding objects, devices, other gadgets and simply perform actions on the smartphone itself. It will be found in almost all subsequent parts.

To get started, we need to install two great programs: Tasker and AutoVoice . Programs are paid, but they are not expensive and I urge developers to be supported.
Then in AutoVoice you need to enable integration with Google Now, or go to the settings - special features and activate there.

Next, go to the tasker. Create a new profile. Press +, for the condition select the event / event, plugin / plugin, then select AutoVoice Recognized.

Click the pencil in the upper right corner, click the Speak Filter and dictate the phrase that we want to respond to. For example, turn off wifi. The recognition will give you 5 options to choose from, click on the more correct one. Press the back button and you should see a picture like this:

Click back again. For the action / Task itself, select Network / Net - WiFi- and see that off / Off is at the top. Press 2 times back and see such a picture (4th profile from above).

We exit the tasker with the back button (it is recommended to always do this so that the updated profiles work) and try.
It should turn out like this: (watch the wifi icon, there is no sound on the video).

That's basically it. By analogy, you can configure any action or sequence of actions for each phrase.
AutoVoice supports regex recognition, that is, you can dictate long phrases, some of which can be variables, but about this some other time, if the topic is of interest.

Finally, a video from the creator of many interesting plugins for tasker - Joao Dias:

A small addition for rooted phones.
If you put the xposed framework and the Ok Google mod for 3rd party activities, you can configure the triggering of the passphrase from any application now (in fact, about 2 months ago, before Google rolled out the update for English speakers).
Who does not provide integration with Google Now: if there is a root, then you can intercept commands through the module to the xposed framework - Google Search / Now API , which supports the AutoVoice plugin. To work, you need to put it first, because If AutoVoice is already installed, then uninstall and reinstall. And so do it after each module update.

Also popular now: