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!
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)
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... .