• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Tasker + Moto, unlock device with voice

Padrepio 69

Newbie
Mar 13, 2017
10
1
I was an happy owner of Moto X Play, that had an app (Moto Voice) which could listen to my voice even if the screen were off and do (simple) tasks even when the screen was locked, unlocking it.
Now I switched to the new Moto Z Play, that is very similar but now Moto Voice use istead the "google voice" setting, and it cannot unlock the screen anymore (but still works when the screen is off). I tried to use "ok google" function, it can be used to unlock the screen via Smart Lock but it does not work when the screen is off. So both those options are not useful for me.

So I tried to create a profile, in tasker, that understand when I call for Moto Voice and automatically unlock the screen. Is the first time I try something more difficult than the basic "set allarm and reduce sound", so I am finding a lot of problems.
First of all: the new Moto Voice does not seem to actually open the Moto Voice app. When I had moto X, I've set some operations that recognize when Moto Voice opens (app->Moto voice -> do...); with moto Z the showed screen is the same screen that everyone has when call for "ok google", and I can not find the rigth app for that. So I do not know what starting option I should use
Then: what action should I call for unlocking -> do tasks via Moto Voice -> locking again?

Thanks for every reply :) and sorry if some of those questions were already answered, I've tried to search for them but I was unlucky
 
When I call Moto, the device awakes and listen my command (probably using the same window of google now, the layout is the same but I cannot confirm that, because if I keep Moto working then the standard "ok google" has to be disabled). But, if the screen was locked with a pin, it remain locked and I have to manually insert the pin.
Is this clear? English is not my main language and I have some problem in trying to explain everything as I would like to.
 
Upvote 0
A side note ... here's an observation for you about your objective ...

I was discussing voice control with a business acquaintance and demonstrated how it ONLY responded to the sound of my voice. As it turns out he has the ability of mimicking other people's voices. He used my launch phrase and it responded.

This being the case .. why don;t you just turn the lock off?

... Thom
 
Upvote 0
Because I know nobody with this amazing ability :p (and I use the PIN to avoid that people that I know can "easily" see my stuff. They can go over my pin, which is not so hard, but then they should justify that bad behaviour. On the other side, if I let my phone unlocked, anyone can use it without any effort).

Furthermore, my Moto Z Play has a fingerprint reader that can only be enabled if a lockscreen is activated.
 
Upvote 0
You're doing great with English ;).

The "Display > Keyguard > Off" doesn't always work. Even in Tasker documentation it says that phone should be on and unlocked, even then not guaranteed to work.

"On Android 2.2+, this action should probably only be used when the device is on and unlocked, unless the unlock method in Android settings is set to None."

Maybe using a simulated input from a plugin (AutoInput, TouchTask etc), that can type your PIN for you might work. I have not experimented with this at all, so can't suggest if it would work or not (especially the plugin acting over the keyguard). I will try it if I get a chance and let you know.

Edit: Scrap that last sentence...
 
Upvote 0
You're doing great with English ;).
Maybe using a simulated input from a plugin (AutoInput, TouchTask etc), that can type your PIN for you might work. I have not experimented with this at all, so can't suggest if it would work or not (especially the plugin acting over the keyguard). I will try it if I get a chance and let you know.

Edit: Scrap that last sentence...
Does that mean that I can not try to type my PIN? :V I'm sad now

One suggestion would be to create your own form of lock screen with Tasker, over which you would have full control of. But it probably is over complicated and is not worth doing? Also not going to be visually as nice.

I could try, but I think I will lose the use of fingerprints in that way, and it's exactly what I am trying to avoid
 
Upvote 0
Yes, my understanding is that is is beyond the capabilities of Android/Tasker, especially without root, at the moment. Mainly the fact that, for security reasons, you don't want the keyguard to be managed by other applications. Maybe somebody more experienced than me might know a way.

Not sure about the second. You would disable fingerprint unlock from the phone options, but a plugin maybe can handle this. I know that TouchTask has an action to give you the fingerprint prompt (not sure if it needs root) but there are two thoughts in my head:
A) will this still work if the phone option for fingerprint is disabled?
B) will it be possible to have that being monitored constantly without draining the battery?
Certainly needs experimenting. I'd be interested to follow this on when I have some spare time.
 
Upvote 0
I am still trying for other things, so as soon as I have an answer I will post it here :)

Can I ask you a thing about commandr? How can I make tasker react to commandr commands?
I have tried to set up in commandr some tasks linked to Tasker, but they are not called. I am only able to use it for (some) basic tasks, like "light on". But, if I use that and set a profile that react to "commandr" to be active, the profile does not start if I use "light on". I would like to set something that I can use to start a profile when I use my vocal commands... any idea? Do I need to open another thread?
 
Upvote 0
Yeah, that's an interesting one.

Here is a way to do it:

A) In Tasker make a profile > Event > Plugin > Commandr > and there you can add the description of the text you want commandr to listen for.
B) Say OK google > Say "take a note" or "note to self" > Say the text you just set for the profile above

If this is the first time taking a note, you will have to select Commandr from the list of "note" apps.

Hope this helps to set it up.

PS: "note to self" might not be required, as technically commandr should be listening to what google is. But in my device it is necessary...
 
Upvote 0
Indeed this was the case, but the author has stopped development and people get mixed results with later updates of Google Search. There are other plugins that do similar stuff, e.g. Tasker Now and AutoVoice (first is free but limited and has a pro version, second is paid but probably a lot better). I'm generally not a big fun of plugins, but just giving you the options.

Yes, you can chain commands easily with the following action:

+ > System > Send intent > and use the following options:

Action: android.speech.action.VOICE_SEARCH_HANDS_FREE
Cat:None
Mime Type:
Data:
Extra:
Extra:
Extra:
Package:
Class:
Target:Service

Just append this action at the end of any task. Remember that its a good practice to add a small pause before, length of which shall depend on your tasks.
 
Upvote 0
Working with intents is a great way to achieve a lot of tasks with Tasker. The hard part is remembering them and also how they are utilised.

Android developers guide is a good start. This intent is listed here. There must be various places around that refer to this action if you search on Google.

Yes, I know what you mean with the plugins. But presumably, something you pay now, works. Also supporting developers is something that I try to do.

But if Commandr does the job, why change it? ;-)
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones