Running Voice Commands While Phone is in Sleep Mode

Hello,

I would like some help in creating an app that can execute voice commands even when the phone is in sleep mode or when the app is not open.

For example, I would like to say "What’s the weather like?", and the app should automatically open and display the weather. I haven’t used any specific extension yet, and I’d love to know the best approach to achieve this.

Additionally, I’m wondering if such a function would work when my phone is locked with a passcode. Is there a way to keep voice recognition active in the background without requiring the device to be unlocked?

Any help or guidance would be greatly appreciated!

Thank you in advance for your time!

as a start try this extension

Taifun

Next?

accept that it will not work. Android shoots down background tasks

@Taifun?

What did you try?
I never used the previously mentioned extension
Did it work in the foreground?

You also could try Alexa Hello World

Try something, experiment, have fun!
Taifun

Taifun, what should I do with this?

I think, this comes close to what you need at least while the app is in foreground
but probably not and I misunderstood everything
you can try the extension and do some tests
or just wait until someone will provide a ready to go solution for you (this will not happen most likely)

Taifun

1 Like

Dear @dimitris.strat,
technical difficulties apart, I believe that this is not allowed nor by Android/Google (as @3dmixer has already said), neither by law.
Having the possibility to leave in background an app that can hear what you say, interpret it and act by consequence, is (greatly) against the privacy because you could embed such functionality into another "visible" app and then steal personal data !
This is more true if you want that this can happen when the app is not open or, better to say, 'hidden' (i.e. running, though not visible) or even blocked. Unless you have a lot of lawyers within your friends... :sweat_smile: :sweat_smile: :sweat_smile:.

All the best !

1 Like

So, is it not possible to run the application in the background?

How many more times do you want to hear it? It's not possible in background

1 Like