use headset button(s) as external/extra inputs for your app
its impossible of disable "OK Google" voice assistant from Android.
If you disable for example Google mic disable other stuff too.
I don't use Google voice assistant, or the headset buttons, so I have no solution, but... if we clarify with some diagnosis, perhaps somebody with a solution might jump in.
As I understand it:
- you'd like to use the headset button(s) in your app, for something other than their usual purpose
- the Google voice assistant is interfering with your access to the button events,
- disabling Google voice assistant stops this interference, but has other undesirable consequences too
Do I have this correct?
If so, the next questions will be:
- what is the interference with accessing button events?
-- are they swallowed up and you don't see them?
-- or do both you and voice assistant see them, and voice assistant is doing some conflicting action?
- what other stuff is disabled when you disable voice assistant?
-- what does that do to interfere with your app?