[MOD][Xposed] Google Search / Now API

Search This thread

chrisnash

Senior Member
Jun 21, 2006
317
7
London
Annoying search results on G Watch

Updated search API working well now using G Watch, AutoVoice and Tasker but it keeps bring up search results on my watch after giving a command. Any way to stop this? I've worked out how to disable the Google Now search on my phone via the advanced options when setting a voice command but can't see a way to disable the search on my phone. It's really annoying :(
 

iHelp101

Senior Member
Feb 7, 2014
1,512
4,037
Updated search API working well now using G Watch, AutoVoice and Tasker but it keeps bring up search results on my watch after giving a command. Any way to stop this? I've worked out how to disable the Google Now search on my phone via the advanced options when setting a voice command but can't see a way to disable the search on my phone. It's really annoying :(

Currently there is no work around for this. The LG G Watch dims and removes the search card after about 15-20 seconds. So you could say "Close Garage" and walk into your house and the card would already be gone. This has not been an issue for me. I either swipe the card or just let it disappear after 15 seconds.
 

Delay3d

New member
Sep 1, 2014
2
0
I've tried different google search versions from 3.5 till the latest 3.6.14, I have autovoice installed and the accessibility checked.
I've also tried the different API's from 1.2 till 1.4 and Google Search still crashes about 5 seconds after I say Ok Google. Am I doing something wrong somewhere?

I9300, nova launcher, cyanogenmod 11 M9. Help is appreciated. Done plenty of google searches, nobody seems to have their google crash when they do this :/

Edit: Backtracked all the way to Google Search v3.4 just to get it to work. Is there a workaround so this works from 3.5 instead? Or is no one able to recreate this :x
 
Last edited:

iHelp101

Senior Member
Feb 7, 2014
1,512
4,037
I've tried different google search versions from 3.5 till the latest 3.6.14, I have autovoice installed and the accessibility checked.
I've also tried the different API's from 1.2 till 1.4 and Google Search still crashes about 5 seconds after I say Ok Google. Am I doing something wrong somewhere?

I9300, nova launcher, cyanogenmod 11 M9. Help is appreciated. Done plenty of google searches, nobody seems to have their google crash when they do this :/

Edit: Backtracked all the way to Google Search v3.4 just to get it to work. Is there a workaround so this works from 3.5 instead? Or is no one able to recreate this :x

Open Xposed Installer and click logs. Do you get any errors in this log? An error will usually look something like "java.lang.NoSuchMethodError". I have never had a crashing issue. One thing to try is go to the latest 3.6.14 and install Google Search API 1.4, which is linked above. Disable the AutoVoice accessibility setting and see if anything changes. Again after doing this check the logs and see if you get any errors or if an error seems to go away after this.
 
Last edited:

Delay3d

New member
Sep 1, 2014
2
0
Open Xposed Installer and click logs. Do you get any errors in this log? An error will usually look something like "java.lang.NoSuchMethodError". I have never had a crashing issue. One thing to try is go to the latest 3.6.14 and install Google Search API 1.4, which is linked above. Disable the AutoVoice accessibility setting and see if anything changes. Again after doing this check the logs and see if you get any errors or if an error seems to go away after this.

I sent an email to Joao and he said that the google api wasn't needed for autovoice to work. So I uninstalled the API and installed the latest Google Search, it worked fine even after a reboot.
After reading your reply, I tried installling the 1.4 API again and after a reboot, it hasn't crashed so far. I have no idea what caused the crashes last night.

Thanks, will update if there are any crashes in the future.
 

iHelp101

Senior Member
Feb 7, 2014
1,512
4,037
I sent an email to Joao and he said that the google api wasn't needed for autovoice to work. So I uninstalled the API and installed the latest Google Search, it worked fine even after a reboot.
After reading your reply, I tried installling the 1.4 API again and after a reboot, it hasn't crashed so far. I have no idea what caused the crashes last night.

Thanks, will update if there are any crashes in the future.

It is great to hear the API is working for you. Currently the API is only needed when you want to use Android Wear since AutoVoice is unable to get the searches from the watch itself. If you are only using your phone for commands then using the AutoVoice accessibility setting will be your best option.
 

zzEvilGeniuszz

Senior Member
Jun 3, 2014
206
38
I too am trying to get Google Search API to work so I can use autovoice. Also, I want to be able to execute Tasker task on my LG G watch but the Google Search API is needed for that. For some reason, no programs are showing up...

2rhseft.png


I have tried several different versions both stable and also beta.

I have also done the same with Xposed itself running stable and also beta version.

My problem is that I have a Huawei phone and there have been issues with this phone and Xposed in the past. Regardless, I need to get it working. Do any of you have any ideas?
 

mdamaged

Senior Member
Oct 16, 2013
2,109
1,448
South of Heaven
Moto G5 Plus
Google Pixel 4a
I too am trying to get Google Search API to work so I can use autovoice. Also, I want to be able to execute Tasker task on my LG G watch but the Google Search API is needed for that. For some reason, no programs are showing up...

2rhseft.png


I have tried several different versions both stable and also beta.

I have also done the same with Xposed itself running stable and also beta version.

My problem is that I have a Huawei phone and there have been issues with this phone and Xposed in the past. Regardless, I need to get it working. Do any of you have any ideas?


Uninstall autovoice, then re-install it, the plugin should show up.
 
Sr, but i dont know how to do to make module work fine. I installed module with xposed, restart, open Walkman to play a song. While Walkman is playing, I open google search app, then click icon micro, it listening my world, but Walkman is pause immediately, so google voice just typing every my word on search box, like normal when I search by voice! What I mistake?
 

iHelp101

Senior Member
Feb 7, 2014
1,512
4,037
Sr, but i dont know how to do to make module work fine. I installed module with xposed, restart, open Walkman to play a song. While Walkman is playing, I open google search app, then click icon micro, it listening my world, but Walkman is pause immediately, so google voice just typing every my word on search box, like normal when I search by voice! What I mistake?

Is the issue that when you use the Google Search app it interrupts the music being played? If so I believe this is standard for most apps. If you opened Google Search and clicked the microphone icon to listen it would be able to get information from the song. So I believe when the Google Search app is opened it pauses the music in order for it to be able to listen to you solely. This module gets the information you said to Google Search, but nothing more then that. It doesn't attempt to block the mute that is caused.
 
Last edited:
  • Like
Reactions: oldman20
Is the issue that when you use the Google Search app it interrupts the music being played? If so I believe this is standard for most apps. If you opened Google Search and clicked the microphone icon to listen it would be able to get information from the song. So I believe when the Google Search app is opened it pauses the music in order for it to be able to listen to you solely. This module gets the information you said to Google Search, but nothing more then that. It doesn't attempt to block the mute that is caused.
Thanks for reply. But why they can do it on video, while me is not? That cause base roms are differences, right? If that true, so I can do like that video[emoji17]
 

dolebomo

Member
Aug 4, 2011
25
9
My watch now controls my garage door, nest, and lights!

What I learned getting my android wear moto360 google search to work with autovoice and tasker:

Order of install is important:
1) Xposed framework
2) Google Search API v1.4
3) Autovoice v2.0.14 (**if it was previously installed, uninstall and re-install after Google Search API)
(existing install of Tasker is fine)

All my settings are in the attached screen shots. If you think you have everything right and its not working, try rebooting the phone one last time.


Screenshot_2014-09-16-08-51-38.png


Screenshot_2014-09-16-08-51-44.png


Screenshot_2014-09-16-08-52-03.png


Screenshot_2014-09-16-08-52-19.png


Screenshot_2014-09-16-08-52-33.png


Screenshot_2014-09-16-08-52-38.png


Screenshot_2014-09-16-08-52-50.png
 

Maxr1998

Recognized Developer
Apr 15, 2013
2,161
3,221
25
Germany
maxr1998.de
Google Nexus 4
Nexus 7
What I learned getting my android wear moto360 google search to work with autovoice and tasker:

Order of install is important:
1) Xposed framework
2) Google Search API v1.4
3) Autovoice v2.0.14 (**if it was previously installed, uninstall and re-install after Google Search API)
(existing install of Tasker is fine)

All my settings are in the attached screen shots. If you think you have everything right and its not working, try rebooting the phone one last time.


Screenshot_2014-09-16-08-51-38.png


Screenshot_2014-09-16-08-51-44.png


Screenshot_2014-09-16-08-52-03.png


Screenshot_2014-09-16-08-52-19.png


Screenshot_2014-09-16-08-52-33.png


Screenshot_2014-09-16-08-52-38.png


Screenshot_2014-09-16-08-52-50.png
Cool, thanks for sharing!
Now I the only thing I need is a smartwatch [emoji23]

Sent using my nexus⁴ running Mahdi 2.7 with Xposed and hells-Core B54 KK
 
  • Like
Reactions: Froryrory

bogus83

Senior Member
Sep 17, 2008
141
24
Thanks a bunch for those screenshots. I spent far too long trying to figure this out and that got it working. :good:
 

ghettobuck10

Member
Jul 1, 2010
15
1
I'm trying to install these latest Google Search API 1.4. When I install the API after unistalling the old version from the link provided in forum it reverts back to
v 1.2. when I reboot. Can somebody help me with this issue?
Thanks
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 118
    Requires Xposed Framework!

    This module adds an API to the Google Search app, commonly referred to as Google Now.
    This allows developers to make plugins that react to searches done in Google Search.

    As of right now, the developers cannot interact with the cards UI, not sure how feasible that is, if it is, it'll be in future versions.

    (I showed this on reddit some days ago: http://www.reddit.com/r/Android/comments/1rmvxs/heres_a_preview_of_my_google_search_now_api/)

    Screenshots:
    IWbHojml.png
    0TQkSlkl.png


    Demos:
    Lyrics fetching: https://www.youtube.com/watch?v=OsNCHo5JZuA
    Song recognition outside US with Shazam: https://www.youtube.com/watch?v=ThbW5glU7zM
    AutoVoice: http://www.youtube.com/watch?v=usjqq5hwlSE

    Compatibility:
    Any 4.1+ device that can run Xposed Framework. ICS not supported at the moment, not sure how recent the Google Search port is.

    Download:
    Please note that this is a 1.0 release, it may or may not have bugs.
    http://repo.xposed.info/module/com.mohammadag.googlesearchapi

    Source:
    This is open source, you're free to contribute to the source, but you're in now way allowed to release this anywhere else.
    https://github.com/MohammadAG/Google-Search-API

    Plugins:
    This doesn't do anything without plugins, which needs developer support. More on that below. Here are some fully working examples:
    • Music Controls: Control music playback. Supported commands: "play/pause/resume music", "play songs by <artist>", "play song <title>", "next/previous track/song", "volume up/down/max", "what song is this" opens in Shazam, requires Shazam, no idea what happens without it.
    • Voice Toggles: Turn on/off Wi-Fi, Mobile Data, or Bluetooth.
    • AZLyrics Viewer: Shows lyrics for songs from AZLyrics.com. Supported commands: "show lyrics for <song> by <artist>", exact syntax required here, artist is not optional.
    • Autovoice, by @joaomgcd, run Tasker commands from Google Search.

    Plugin sources:
    1. Music Controls: https://github.com/MohammadAG/GNAPI-MusicControls
    2. Voice Toggles: https://github.com/MohammadAG/GNAPI-VoiceToggles
    3. AZLyrics Viewer: https://github.com/MohammadAG/Android-AZLyricsViewer

    Developers:
    Implementing plugins is as easy as copying one file to your source, and implementing a BroadcastReceiver that listens for the search queries (sent as text). If you're implementing a UI, implement TextToSpeech for voice feedback, if not, use GoogleNowApi.speak for voice replies.
    All this is demonstrated in the examples above.
    You'll also need to add a permission to AndroidManifest.xml: "com.mohammadag.googlesearchapi.permission.ACCESS_GGOGLE_SEARCH_API"
    Remember that any package needs one activity to be started to work, see the music controls example for a way around that.
    Of course, you're free to make your plugins free/paid/whatever.

    What are the two checkboxes for?
    If you're using GEL, you basically need to have the first checkbox checked. This is because GEL uses an overlay for the first part of the search, then opens the usual search app without the transitions. This means that if a developer already started an activity, it'll be sent to the background cause search was started after it.

    Second checkbox prevents duplicate searches, this can be useful (you'll see how), and not so useful (when you do two volume ups/downs). Experiment as needed.

    Support development
    This took quite a lot of research, Google Search's code is huge, if you found this useful, please consider a donation.
    26
    3.6.13 Google Search Update

    bir -> bpn
    bjb -> bpy
    bur -> cby
    cmh -> cuc
    w -> x
    azL -> aCT
    heb -> hmu
    bul -> cbs
    bkt ->bqk

    Tested and everything is working including text searches. APK is attached.
    21
    Okay, I mean I have no real life and stuff.
    So I forked @MohammadAG project on Github and fixed it.

    All credits go to the OP! It's confirmed working on Auto voice again, didn't test it myself, though. Needs more testing.
    I've incremented the build number and opened a pull request on Github. The apk above is signed with debug keys if anyone cares.

    If OP doesn't want it, please report this post. Calling @GermainZ just to let him know.
    18
    MohammadAG You are the man! Here is a video I put together on some of the things you can do with it, fantastic Job!

    15
    Enjoy. Updated to 1.31 and should be working perfectly.