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

Apps Interacting with running Google Search app

hackster84

Lurker
May 15, 2014
8
1
Hi,

I am writing an app that transmits and receives data over the audio port, which requires me to start an AudioRecord instance on the mic. I have the app working on most phones, however I ran into an issue on the Droid Mini where the Google Search app has an active AudioRecord on the input source I need. This is due to the Hotword Detection being active at all times on the phone. I don't know why this is an issue on this phone only, as I have the Hotword Detection active on my phone as well (Droid RAZR M) and I have no problems getting access to the resource.

In my research on the matter, I noticed that there are permissions called com.google.android.googlequicksearchbox.permission.PAUSE_HOTWORD and com.google.android.googlequicksearchbox.permission.RESUME_HOTWORD which indicates to me that there is a way to pause the Hotword Detection so that another application can use that resource for something. With that in mind, I would like to be able to pause Hotword Detection when my app is actively reading data and resume it when the audio resource is no longer needed. I have looked everywhere and I can't seem to find what I need to do in order to call the routine that would actually pause the detection. Is it simply a matter of including those permissions in my manifest file, or do I need to do that and call an actual pause() and resume() function?

I ran an ADB bugreport on the affected phone and I found these entries in the report file:

Code:
      Action: "com.google.android.googlequicksearchbox.action.PAUSE_HOTWORD"

      Action: "com.google.android.googlequicksearchbox.action.RESUME_HOTWORD"

      requiredPermission=com.google.android.googlequicksearchbox.permission.PAUSE_HOTWORD

Again, this is essentially the action that I'm trying to accomplish - any idea how I can do that? As always, thank you in advance for your help.

-Chris
 

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