Here is ChatGPT's response:
As of my knowledge cutoff in September 2021, I'm not aware of a way to programmatically send a text query to a device's voice assistant (like Google Assistant) using Basic4Android (B4A).
The VOICE_COMMAND Intent action you're using typically triggers a voice prompt, asking the user to speak a command. The command is not something that's passed in via an Intent extra; it's something that the user speaks after the voice prompt is displayed.
Google Assistant, and most other voice assistants, are designed to receive spoken queries, not text input from another app. The primary way for an app to interact with Google Assistant is through voice interaction, which is not easily automated. The .setTextQuery() method you mentioned earlier is part of the Google Assistant SDK, which is a separate system designed to allow devices to include Google Assistant functionality, and is not intended for sending text queries from one app to Google Assistant on the same device.
While there may be other voice assistants or services that allow for text queries, Google Assistant (which is the most commonly used on Android) does not provide this functionality. It's also important to note that voice assistants can vary greatly from device to device, so a solution that works with one may not work with another.