FORUMS
Remove All Ads from XDA

[Xposed] OK, Google Now -> Broadcast intent

97 posts
Thanks Meter: 42
 
By hawkjm73, Member on 6th February 2014, 05:28 PM
Post Reply Email Thread
I've made a small module that broadcasts an intent when the "OK, Google now" trigger phrase is recognised. The intention is to listen for the intent with an app such as Tasker and do your own voice interface from there. This module stops all native Touchless Control functions, so you have to handle any commands you want on your own. The screen does not turn on if it was off and internet connectivity is not required.

There are two beeps I haven't been able to track down yet, though one can be disabled via the Touchless Controls settings.

Xposed Repository
http://repo.xposed.info/module/com.h...wtriggerintent
The Following 15 Users Say Thank You to hawkjm73 For This Useful Post: [ View ] Gift hawkjm73 Ad-Free
 
 
7th February 2014, 02:36 AM |#2  
Senior Member
Thanks Meter: 35
 
More
I'm not well versed in tasker, could you help me make a tasker action to here the ok Google now phrase then open the app utter and start listening

Sent from my XT1056 using xda app-developers app
7th February 2014, 04:02 AM |#3  
OP Member
Thanks Meter: 42
 
More
Quote:
Originally Posted by charlie-n

I'm not well versed in tasker, could you help me make a tasker action to here the ok Google now phrase then open the app utter and start listening

Sent from my XT1056 using xda app-developers app

First, you need a profile. It'll need an event for Intent Received, with com.hawkjm.okgooglenowtriggerintent.AUDIO_TRIGGER in the Action field.

Next, you'll need a task to command utter. I'm using autovoice, so I'm not terribly up to date on utter. They've got instructions and examples in this thread:
http://forum.xda-developers.com/show...69357333332300
7th February 2014, 01:50 PM |#4  
Senior Member
Flag Long Island
Thanks Meter: 12
 
More
Hello, I've been using the "Google Now API" module for xposed framework with the tasker autovoice plugin. How is this module different exactly? The way I described, touchless controls is left intact and functions exactly how it would otherwise, but a command is given through autovoice to tasker, and Google now opens and does a search on whatever command you entered. What is different with your module?

Thanks in advance...
7th February 2014, 03:32 PM |#5  
OP Member
Thanks Meter: 42
 
More
This module basically hijacks the touchless controls trigger so you can do your own voice interface. My use case is :

-say "Ok, Google now"
-Tasker launches AutoVoice recognition
-I say something like "Start my car"
-Tasker handles the request and starts the car

My goal was to allow this to happen completely in the background, and with the screen off. This doesn't disturb anything else I might be doing on the phone, nor does it activate the screen. Also, it uses onboard recognition is available, and so is a bit faster then having Google Now do the recognition.
The Following 2 Users Say Thank You to hawkjm73 For This Useful Post: [ View ] Gift hawkjm73 Ad-Free
7th February 2014, 04:01 PM |#6  
Senior Member
Thanks Meter: 35
 
More
I've tried something very simple and it won't work please correct this if I'm wrong.
1. Open tasker
2 create profile /system/intent received
3. Typed com.hawkjm.okgooglenowtriggerintent.AUDIO_TRIGGER into the action field.
4. Hit back
5. Enter task menu pops up, and I click new task.
6. I give the task a name, then I click + to add action. I select App/ load app/ calculator.
7. I go back to main menu and make sure profile is active.
8. I go to home screen and say "ok Google now" I hear a beep. No action happens.


Does any one see anything wrong

Sent from my XT1056 using xda app-developers app
7th February 2014, 04:28 PM |#7  
OP Member
Thanks Meter: 42
 
More
Lately, I've been needing to add steps to get Tasker to act as expected. Once you've completed your profile and task, completely exit Tasker, making sure to hit "save first." Then, if needed, deactivate and reactivate Tasker's monitor by long-pressing the little gear in the left corner. I usually run a little task that pops a toast then to make sure it is active. In most cases, just the full exit and save is sufficient.

If that doesn't work, check in Tasker's log to see if it is seeing the intent. If no, check your logcat for the intent being broadcast.
7th February 2014, 04:40 PM |#8  
Senior Member
Thanks Meter: 35
 
More
I fixed it, I had to install secure settings app to wake screen then launch the app I wanted, utter had so Manu more commands

Sent from my XT1056 using xda app-developers app
7th February 2014, 05:01 PM |#9  
Senior Member
Flag California
Thanks Meter: 93
 
More
Is "Secure Settings" required for this to happen? Does Tasker need to be made an Administrator?

**Edit**
Looks like SS is required
7th February 2014, 09:42 PM |#10  
Senior Member
Thanks Meter: 35
 
More
This post should be way more populated, the possibilities of this plus tasker are endless

Sent from my XT1056 using xda app-developers app
8th February 2014, 05:44 PM |#11  
Senior Member
Thanks Meter: 29
 
More
Is this module designed for KK or is it compatible with JB. I can't seem to get any logs in the tasked app. Will check logcat.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes